The Samba file server is located under the work bench. User is “ubuntu” and the password begins with a “j”. Everyone should know what it is. But it's written on a label on the computer.
The file server is a spiffy machine with two hard drives. The Ubuntu/GNU/Linux operating system is located on the smaller 20 gig hard drive. The second hard drive was partitioned with FAT32 and will be used to serve files.
In the Gnome desktop, go to System =⇒ Administration == Shared Folders. After entering your password, a window popps up saying “Sharing services are not installed.” You have the option of Installing services for NFS or for Windows network SMB (Samba). I chose only Samba and pressed “Install services”. Samba installs.
The Shared Folders window is made available. There are two hard drives on the file server and we wanted the second 40 gig hard drive (formatted as a fat32 system) to be accessible via Samba. I clicked on the ”+ Add” button. In the Path field, I chose the location of the second hard drive and everything else was left as default. This is the info:
Shared Folder
Path: /media/hdb5
Share through: Windows networks (SMB)
Share Properties
Name: ubuntu
Comment:
I left the comment field blank and there was a checkbox option to have this read only. I unchecked that. And pressed okay.
After I did this, Samba was running and I went to the XP machine and chose Network Neighborhood and to my surprise, after doing a network scan on the XP machine, the Ubuntu file server appeared but was inaccessible.
I learned I needed to create a password for Samba that linked to the default user on this machine, which was “ubuntu”. I went back to the file server and ran the following command:
sudo smbpasswd -a ubuntu
I got a prompt to enter a password. I used the “j” password again. Then I restarted samba:
/etc/init.d/samba restart
After a minute or so, I went back to the XP machine and attempted to gain access to the File Server, which asks for a password if I hadn't mentioned that yet. I entered the “j” password and boom, we're in!
Alas, there were a couple other hiccups along the way. I needed to edit the fstab entry on the file server so the second hard drive would automatically mount on reboot.
Here's the fstab entry for the second hard drive (actually, this entry below is a guess, I don't have my notes with me, but it's fairly close):
/dev/hdb5 /media/file_server vfat rw,user,auto 0 0
I went to the /media directory and created the /media/file_server path:
sudo mkdir file_server
Made sure permissions and ownership were owned by the “ubuntu” user:
sudo chown ubuntu:ubuntu /media/file_server
Then I rebooted the file server to confirm the second hard drive automatically mounted and was accessible without having to type “sudo”. After this was confirmed, we went back to the XP machine and entered the password and everything was hunky dorey. We were able to read and write to the file server's second hard drive.
The SAMBA server has been placed under the workbench and the ethernet cable attached to it has been labeled “File Server” with a couple of strips of blue tape. That's so you know not to unplug that cable to use for other purposes. Or so you know to unplug it if you want to take the file server down.