November 29th, 2005, 12:07 AM
Mounting smb on freebsd
So I have been trying to find a nice simple way to mount a few of my windows shares to my freebsd box. However this has proved to be the most difficult task I have attempted in freebsd. I am not complaining or anything, I just figured it would be fairly straight forward.
So I did some google searches and came across smbfs and such, use ports and installed it. I try to compile it into my kernel(first time with comping the kernel) and I get this error msg saying that my config file doesn't match the kernel, I even tryed to compile the GENERIC kernel and it doesn't work either with the same error msg. It says my config file is 600003 and I need 600004. I looked through the config file for anything that would allow it to determine what version it is for, and I came up with nothing.
I am using freebsd 6.0 -- stable I am updating my ports collection and all of my apps on the system. Any ideas on why I can't compile my kernel and a nice method of setting up an automounting password protected windows share?
December 1st, 2005, 01:02 AM
Well I have sorta Fixed the problem with my kernel. I found out that I don't need recompile the kernel, I switched to FreeBSD 5.4 so now I a stable release and such. However I am still getting an error when trying to mount the share:
with this code:
I get this error:
mount_smbfs //cory@mainServer/files /mnt/files
with this code :
mount_smbfs: can't get servers address: syserr = Operation time out
I get this error
mount_smbfs -I 192.168.0.122 //cory@mainserver/files /mnt/files
anyone with any ideas?
mount_smbfs: unable to open connection: syserr = Operation time out
Last edited by CyBerHigh; December 1st, 2005 at 01:07 AM.
December 1st, 2005, 09:24 PM
Ok, I have found out the source of the errors.
The kernel one was because there seems to be an error with the 6.0 release and the kernel configure. Turns out that I don't even need to put the smb part into the kernel anyway. Since the 5.x release they have been included.
Now the reason that my command wasn't work is because the -I flag can't have an ip address used, it most be a hostname. So append a hostname to your /etc/hosts file and it is a simple fix. So this command below works:
It turns out that what is used after the @ sign doesn't actually matter, just make sure it corisponds to your /etc/nsmb.conf file, if you are going to use that for easying configuration.
# mount_smb -I sambaServer //user@blah/sharename /mnt/path
for the etc file you can append to it with this:
You can modifie the /etc/nsmb.conf file so that you do not have to enter the password on every mount for normal servers. It is well documented.
# echo "192.168.0.23 sambaServer" << /etc/hosts