Perform the following steps, in the order given, on your vbox.
Add your ordinary user account to the adm and root groups. This will allow your user account to access (most) log files in /var/log/. (Remember we used usermod command to add extra groups to a user?) Also add an account on your system for the instructor (username 'csci251'). I will tell which password to use for this account in the lab.
Install any packages needed to run the samba servers, as well as the samba clients smbclient, and smbmount/smbumount. (How do you find the package names? See manual page for dpkg.) Use the name CSCI251 as the default workgroup name. Note that letters in workgroup names should be UPPERCASE.
The workgroup name, as well as other configuration parameters for Samba, are stored in a text configuration file smb.conf. By default, samba exports user home directories read only. Change this to read/write in the above file. Make sure you make a backup (smb.conf.orig)of the original before changing it.
Using smbpasswd, set up a password for yourself and for the instructor, csci251. The instructor will supply the samba password to use for the csci251 account as well.
Using smbclient, determine the shares available on your computer. (Hint: try the -L option.) When prompted for the password, just hit Enter. Why don't user home directories show up? Now try it again and enter the password when requested. Can you see the difference?
Using smbclient, connect to your home directory on your computer. The command should look something like:
where lenny is the name of your computer and myname is your username. When requested, give the samba password you set up for yourself in a previous step.
Determine what commands are available when connected to an SMB share interactively using smbclient. What command gives a directory listing? What command copies a file?
Use netstat or nmap on vbox to find out which port samba is using for connections. Now on the host machine run VBoxManage command to set up port forwarding. (See Lab5 for details.) Use an unused port number above 1023 for HostPort and the one that you found out above as GuestPort. Use TCP as protocol.
Run smbclient command to connect to your home directory on vbx using port forwarding. Copy the syslog file in your home directory on vbx to the host system.
To receive credit for this lab, you must perform the demonstration above and create a single file with the following information and email to the instructor (firstname.lastname@example.org) by 8:00 on Monday March 29, 2010.
Where does samba save its log entries?
How did you determine which packages you needed to install for this lab?
Give the output of the following command:
diff -c smb.conf smb.conf.orig
where smb.conf is your final samba configuration file, and smb.conf.orig is the original samba configuration file (as supplied by the Debian GNU/Linux installation).
How does the -c option affect the behaviour of diff?
In smbclient, what command gives a directory listing?
In smbclient, what command copies a file?
What happened when you tried to mount something on top of /tmp? Why? (Hint: what user-id owns /tmp?)