This page is documents the steps I had to undertake to configure a Linux box to mount a Windows share via the smbmount command. To begin with I will give a little background as to the situation I was in and the configuration I had. I needed to mount a Windows share on with smbmount. I am running SuSE Linux 6.3 and the samba version was 2.0.5a and smbmount isn't supported until the 2.0.6 release. In addition smbmount isn't a part of the actual samba package, it is actually a part of smbfs. You can however recompile the source to include smbmount support. I was also using the 2.4.test9 Kernel and to begin with I recompiled the Kernel to include support for smb file systems.
*NOTE
Files and commands are red
Directories are yellow
Hyperlinks are blue/orange
One way to ensure this is to recompile it and update it while your at it (click here for the HowTo)
It will be called: samba-latest.tar.gz
copy it to the /usr/src/packages/SOURCES directory
Use the command: gzip -cd samba-latest.tar.gz | tar xvf -
Use the command ./configure --help
./configure --with-smbmount
Enter the command: make
Then the command: make install
You can get the example file in /usr/src/packages/SOURCES/samba-2.0.7/examples/smb.conf.default
Or download it here (right click and save as "smb.conf") -8.5K
Place you smb.conf in /usr/local/samba/lib or if you specified another directory with a ./configure option, put it in the specified directory
You can test your smb.conf file for correct syntax after you make changes to it by using the command: testparm smb.conf
Here's a copy of my script
if you change the smb.conf file while the server is running then you will have to restart the service using the command: kill -HUP "PID" -the PID is the process Identification and can be found using the commands: ps aux | grep smbd and ps aux | grep nmbd, if the daemons are running it will return all the information for the daemon -the PID is on the far left. Or you can use the command: /etc/rc.d/smb restart (if your script is written to support restarts) -this reruns the script that initially started the server; besides restart, other options are start, stop, reload, and status -also note that this script can be found in different locations and can be called by different names according to your distribution -Samba can also be started by /etc/inetd.conf and you should read its man page for more information. Or you can always take the easy way out and simply reboot.
After you restart the service you should be able to mount a windows share with the command:
smbmount //servername/sharename /mount point -U username