UNIX Basics Worksheets.

User Management:

1.Log in as root (with your password)
2.Type in the following commands:

pw useradd  <USERNAME> -m
passwd <USERNAME>

3.Use  ALT+F2 (i.e Hold down the ALT key and press F2) to switch terminals
4.Login with username and password created and type:  
5.Doesn't work – why?
6.Switch back to first terminal (i.e use ALT+F1)
7.Type: 
pw usermod <USERNAME> -G wheel 
8.Switch back to user terminal (ALT+F2)
9.Try  
10.Still doesn't work.. why?
11.To see what the system thinks of us type: 
12.Log out and log in again
13.Type 
14.Now try 
15.After you have done that, you can log out with 

Attaching and Detaching devices:
ls /cdrom
mount -r -t cd9660 /dev/acd0 /cdrom
(should have contents of CD drive)
(case sensitive)
'q' to quit
(always do this before ejecting any removable media)

Binary package management:

1.Mount your FreeBSD CD1 in your CDROM drive.
a.pkg_add /cdrom/packages/All/imake-6.9.0.tbz
b. (note the backslash is to escape the *)
2.All files under /usr/local
3.Type 
4.Doesn't work? Why?
5.and try again.
Enabling SSH
1.Log in as root
2.vi /etc/rc.conf
3.Scroll down to the bottom, type “i” and then add the line
4.sshd_enable=”YES”
5.Type  to save and quit
6.vi /etc/ssh/sshd_config
7.Look for the line that says “#PermitRootLogin no” and change it to “PermitRootLogin without-password” (do not include the quotes and remember to remove the # )
use the “x” key to delete the characters you do not need including the initial “#” then use the i key to enter “insert mode” to add the characters you need. When done save the file with [ESC] then “:wq”