Sunday, April 18, 2010
Upgrading to Snow Leopard
Wednesday, September 2, 2009
Monday, July 6, 2009
Resetting / By passing OS X login password
1. Reboot
2. Hold apple + s down after you hear the chime.
3. When you get text prompt enter in these terminal commands to create a brand new admin account (hitting return after each line):
* mount -uw /
* rm /var/db/.AppleSetupDone
* shutdown -h now
4. After rebooting you should have a brand new admin account. When you login as the new admin you can simply delete the old one and you’re good to go again!
**************************************************************************
If the Mac is in Read only mode:
Resetting PRAM and NVRAM
1. Shut down the computer.
2. Locate the following keys on the keyboard: Command, Option, P, and R. You will need to hold these keys down simultaneously in step 4.
3. Turn on the computer.
4. Press and hold the Command-Option-P-R keys. You must press this key combination before the gray screen appears.
5. Hold the keys down until the computer restarts and you hear the startup sound for the second time.
6. Release the keys.
Ref: http://illshare.wordpress.com/2008/06/01/how-to-resset-administrator-password-mac-os-x/
Friday, June 5, 2009
DNS and WINS

When a Windows PC starts up on the network it announces itself by broadcasting a message with its name to see if any other computer on the network is already using that name as well as broadcasting its shared resources. WINS enables NetBEUI network clients to access name databases using point-to-point communication modes that are routable.
Clients connect to the WINS server through an IP address allowing them to communicate beyond their local subnet through a router. Without WINS netbeui will not communicate past its local subnet (over a router). WINS cannot be used by other OS?s only windows.
How to install WINS on NT Server 4.0 ·
Right Click on Network Neighborhood and click on Properties ·
Select the Services and click on Add ·
In the Network service box select Windows Internet Name Service ·
Windows will probably ask for your CD to install files ·
Restart your PC and set your clients to
Configuring your WINS Server ·
You should find WINS Manager in the Network Admin group ·
Click on Server and then Configuration You will have the following options to configure: ·
Renewal Interval how often a WINS client must reregister its name usually 1 to 2 days but not more than 4 days · Extinction Interval specifies the interval between when a name is released and when it is extinct · Extinction Timeout tells you how long after a name is marked extinct that the name is actually purged from the database · Verify Interval specifies the interval after a WINS server must verify that names it does not own are still active. · Check on logging to log to jet.log
To run an efficient WINS network you should have a WINS server different segments of your network as well as WINS proxys. Two WINS servers can utilize the push pull method of database replication. A push replication tells the other WINS servers of changes and sends database replicas upon receiving a request from a pull partner. A pull partner is a WINS server that requests replication data from a push partner. To configure replication choose replication partners in the server menu of the WINS configuration menu. Select another WINS server in the Replications partners dialog box. The WINS database is stored in WINS.mdb. WINS also uses System.mdb that holds structure of the WINS database.
As shown above each domain can be divided into subdomains or children of their parent domains. Your domain name also identifies where your position in the database is. Before the implementation of DNS, the use of names to locate resources on TCP/IP networks was supported by using a name resolution method based on files known as HOSTS files. Each HOSTS file contained a list of host (computer or other TCP/IP network device) names and their associated IP addresses.
This is fine on a small network but on a network as large as the internet this is unmanageable. Berkeley Internet Name Domain (BIND) - this was originally used by BSD 4.3. Really the difference between BIND and DNS is like comparing SuSE to Red Hat. Aside from the fact that SuSE kicks ASS.. (Basically different flavors of the same product) Usually BIND was only used on different Unix machines now it can be found on Windows NT. I think it comes with the Resource Kit for NT 4. See your UNIX sysadmin and ask about BIND its pretty ***** cool. I have the whole printout from my work! Microsoft Windows 2000 now uses DDNS (dynamic DNS with additions for specialized characters that Microsoft uses) for its name resolution. One would be correct to question why there are two separate, but almost identical services. (WINS and DNS) Microsoft also recognized the similarity and changed the way Windows works. There is a hierarchy that NT and Windows PC's use for netbios name resolution. They typically check WINS, then DNS, then local host files (2 of them), then do a broadcast over the network. The order has changed between different version of NT and Windows and even with different service packs, so I can't be absolutely specific. Sometimes DNS is first.
Further Reading DNS RFCs 1033, 1034, 1035, 1101, 1123, 1183, and 1536
DDNS RFCs 1995,2136
Reference:
Haven_97@hotmail.com
http://www.hackinthebox.org/modules.php?op=modload&name=News&file=article&sid=502
WINS is an implementation of the NetBIOS P-node server. What this means is that Windows PCs can find each other on the network by registering themselves with a centralized server, then asking that server about other PCs.
Contrast with NetBIOS
NetBIOS was developed in the mid-1980s by IBM, Sytek, and Microsoft. Its purpose was to allow PCs to communicate over a local area network, especially IBM's 3mbps Ethernet-like cable service as well as IBM's later Token Ring LANs.
It allows NetBIOS-aware applications to communicate regardless of the underlying infrastructure. For example, on the older Windows PCs, you have the choice of installing NetBEUI (NetBIOS raw over Ethernet) or NetBIOS over Novell's IPX. Yet another option is NetBIOS over TCP/IP.
WINS is just a component of the NetBIOS over TCP/IP implementation. It is not used with NetBIOS over any other transport.
Contrast with DNS
WINS is similar to DNS: both systems will resolve a name into an IP address. DNS solves the general Internet naming problem, WINS is designed only for NetBIOS names. It is only used in the cases where NetBIOS applications (such as Windows File and Print Services) need to talk to each other.
However, Microsoft makes "helper" services. If you need a DNS name but one cannot be found, Windows will lookup the name in the WINS server. Similarly, if a NetBIOS name cannot be found in the WINS server, Windows will attempt to lookup the name in the DNS server. This means that while WINS and DNS have completely different heritages that know nothing of each other, they effectively become interchangeable.
WINS vs. no-WINS
WINS isn't necessary for all communication. NetBIOS has been designed around a "broadcast" mechanism. The default Windows behavior is to simply broadcast information on the local network. Installing a WINS server (and configuring the clients to use it) will reduce broadcast traffic. Also, since broadcasts do not travel across subnets, WINS may be the only way that two distant machines can find each other.
Reference
http://www.iss.net/security_center/advice/Services/Directory/WINS/default.htm
WINS | DNS |
---|---|
The purpose is to resolve NetBIOS names to IP addresses. | The purpose is to resolve host names to IP addresses. |
Names are flat and 15 characters long. | Names are hierarchical in nature. |
Name registration is dynamic and happens automatically. | Name registration is static and has to be done manually. |
Supports incremental replication of the data, which means that only changes in the database are replicated between WINS servers. | Doesn't support incremental replication of data between DNS servers. This means the whole database has to be replicated every time. |
Supports DHCP. | Doesn't support DHCP. |
Doesn't support email routing or additional TCP/IP application services. | Supports other TCP/IP application services such as email routing. |
Tuesday, June 2, 2009
Creating Root Account
1) Create a new user account as per normal (adduser
2) Edit the /etc/passwd file to modify the UID and GID of user
From this
dsmadm:x:101:1:This user accound used for NBU :/export/home/dsmadm/:/bin/ksh
To
dsmadm:x:0:0:This user accound used for NBU :/export/home/dsmadm:/bin/ksh
3) Change the file/directory permission for
chown 0:0 /export/home/dsmadm
chown -R 0:0 /export/home/dsmadm/*
chmod 700 /export/home/dsmadm
=================For Fedora===============
Create extra root user account to your Linux box.
The ‘root’ account with user id 0 is the most powerful user in Linux and Unix system. This article show the step by step to create the duplicate root account that have the same privileges as super user root account on the Linux Fedora Core operating system.
You may want to make replicate of root user account, or to create more than one user account that have the same capabilities as a 'root' user (superuser) account. Why, may be for a root backup user account, incase of something happen to the 'root' user account or may be just for fun :-).
To create another root user account, we need to replicate the 'root' user account characteristic, then make one account that have the same characteristic and capabilities of the 'root' user account.
Let begin by check the 'root' user account.
1. Check user id for ‘root’ user account:
[root@fedora ~]# id root
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)
Explanations of the command output:
A. uid=0(root) The user id for user 'root' user is 0.
B. gid=0(root) the group id for user ‘root’ is 0.
C. groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel) The user ‘root’ is belong in groups; root, bin, daemon, sys, adm, disk and wheel.
2. Now we take a look at the passwd, shadow and group files that contain ‘root’ user information:
[root@fedora ~]# less /etc/passwd
root:x:0:0:root:/root:/bin/bash
[root@fedora ~]# less /etc/shadow
root:$1$B2BEWv4X$Gb.QPb6I3RwCkEkz13ow21:13080:0:99999:7:::
[root@fedora ~]# less /etc/group
root:x:0:root
bin:x:1:root,bin,daemon
daemon:x:2:root,bin,daemon
sys:x:3:root,bin,adm
adm:x:4:root,adm,daemon
tdisk:x:6:root
wheel:x:10:root
From the information gather above, to create a user that have the same power (superuser power) as a ‘root’ user in Linux system, we need to create a user with same root user uid, gid and group.
3. To create user account that has the same ability (super user) as the ‘root’ user, issue this command:
[root@fedora ~]# adduser -u 0 -o -g 0 -G 0,1,2,3,4,6,10 -M root2
Adduser command explanations:
adduser | -u 0 -o | -g 0 | -G 0,1,2,3,4,6,10 | -M | root2 |
Using Linux adduser command to create a new user account or to update default new user information. | Set the value of user id to 0. | Set the initial group number or name to 0 | Set supplementary group to: 0 = root 1 = bin 2 = daemon 3 = sys 4 = adm 6 = disk 10 = wheel | 'home directory' not created for the user. | User name of the new user account. |
Note: you need to have the administrative privilege on the system in order to issue 'adduser' command above.
4. Now add a password for user ‘root2’ by issue the ‘passwd root2’ command, see example below:
[root@fedora ~]# passwd root2
Changing password for user root2.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
Note: you need to have the administrative privilege on the system in order to issue 'passwd' command above.
5. Check id for user root2 by issue the ‘id root2’ command, see example below:
[root@fedora ~]# id root2
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)
6. Now recheck the passwd, shadow and group files that contain ‘root2’ user informations to confirm the changes:
[root@fedora ~]# less /etc/passwd
root:x:0:0:root:/root:/bin/bash
root2:x:0:0::/home/root2:/bin/bash
[root@fedora ~]# less /etc/shadow
root:$1$B2BRWv4X$Gb.MPc6I3RwCkEkT13ow21:13080:0:99999:7:::
root2:$1$bQHGH4cX$TtsV/WVdFe5cIsHWjzc.N1:13112:0:99999:7:::
[root@fedora ~]# less /etc/group
root:x:0:root,root2
bin:x:1:root,bin,daemon,root2
daemon:x:2:root,bin,daemon,root2
sys:x:3:root,bin,adm,root2
adm:x:4:root,adm,daemon,root2
disk:x:6:root,root2
wheel:x:10:root,root2
7. Everything should be ok, now try to login to system with newly created ‘root2’ account, see example:
login as: root2
root2@10.7.0.211's password:
Last login: Thu Nov 24 23:48:49 2005 from 10.7.0.112
Could not chdir to home directory /home/root2: No such file or directory
-bash-3.00#
-bash-3.00#
-bash-3.00# su –
[root@fedora ~]#
8. Make sure that you execute the su command with hyphen ( su - ) to get the PATH of the user that you become to... below is the example of the su command with hyphen and without hyphen.
Loggin in as user tenouk, then execute $PATH as example below.
[tenouk@fedora ~]$ $PATH
-bash: /usr/lib/qt-3.3/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/ tenouk/bin: No such file or directory
[tenouk@tenouk ~]$
Use the su command to change to root user as example below and then execute $PATH as example below.
[tenouk@fedora ~]$ su root
Password:
[root@fedora tenouk]# $PATH
bash: /usr/kerberos/sbin:/usr/lib/qt-3.3/bin:/usr/kerberos/bin:/usr/local/bin:/b in:/usr/bin:/home/tenouk/bin: No such file or directory
[root@fedora tenouk]#
Then try use the su - command and verify with the $PATH as example below.
[root@tenouk tenouk]# su - root
[root@tenouk ~]# $PATH
-bash: /usr/lib/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin: /usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin: No such file or director y
[root@tenouk ~]#
Note: The execution of su command, without the hypen ( - ) you inherit the PATH of the current user. Use the su command, with hyphen ( su - ) to get the default PATH of the root user.
Step-by-step how to procedure above tested on:
Operating System: GNU/Linux Fedora Core 4
Kernel Name: Linux
Kernel Release: 2.6.11-1.1369_FC4
Kernel Version: #1 Thu Jun 2 22:55:56 EDT 2005
Machine Hardware: i686
Machine Processor: i686
Hardware Platform: i386
Shell: GNU bash, version 3.00.16(1)-release (i386-redhat-linux-gnu)
Installation Type: Full Installation (Custom)
SELinux: Disable
Ref: http://www.labtestproject.com/create_root_user_account
Sunday, April 19, 2009
Cloning Mac HDD
1) SuperDuper!
2) Winclone
3) New HDD
4) NTFS-3G_1.2310-stable-catacombae.dmg
Note:
Mac OS X can boot from external HDD. Hence, after cloning the Mac OS X partition to an external HDD, you can verify that the HDD is good to go by booting from it before swapping the external HDD with the internal HDD.
Partition the new HDD. My recommendation is 3 partitions. First partition for Mac OS X, second partition for Windows(Bootcamp). I would recommend a small partition for this as you can always mount this partition to in vmware. And lastly, the final partition as a NTFS partition. The last partition is used to store data to be exchanged between Mac OS X and Windows. This is because Mac OS X cant read from the Windows(Bootcamp) partition when mounted in vmware. As such, the final partition would act as an intermediate partition to exchange data between the 2 OSes.
Install the NTFS plugin to enable Mac OS X to write onto the final partition.
*Recommended to change the existing bootcamp partition into NTFS to enable Winclone to copy the bootcamp partition and clone it to a larger partition. If left as FAT32, the new Windows bootcamp partition is limited to the same storage capacity as the original bootcamp partition.
1) Use SuperDuper to clone the existing Mac OS X partition to the new partition. This might take a while. FYI, 60Gb partition cloning took 1 hour ++.
2) Use Winclone to create an image of the windows bootcamp partition. Restore this image to the new partition. You can delete the image after restoration.
3) Reboot to test out the cloned partitions and swap the HDDs.
Saturday, March 7, 2009
WiFi Quiz
2) What is MAC Filtering ?
3) MAC filtering constraints, eg Access point memory size, not scalable, have to configure each Access Point, MAC can be spoofed
4) What is WEP/WPA?