SMB username and password

I have a Windows Vista file server which requires usernames and passwords to log into the shares. I cannot figure out how to get the username and password passed to fstab so it is automatically loaded on boot.

Please inform me of how to set up fstab so that I can do this without having any user input.

Also, if there needs to be a umask option specified in fstab so that all users may read and write to the shares please inform me of how to do this. If this is not possible that is ok with me, but I absolutely need to know the fstab bits to automount.

Thanks in advance.
 
/etc/nsmb.conf you can specify multiple users @ multiple hosts with there passwords. after that you just put the share in fstab
+ check mount_smbfs man page.
 
just for the record the solution is
Code:
# The 'FSERVER' is an NT server.
[IP_OF_SHARE_SRV]
#charsets=koi8-r:cp866
addr=IP_OF_SHARE_SRV

[IP_OF_SHARE_SRV]
# use persistent password cache for user 'joe'
password=aqddsfd
password is plain text in the nsmb.conf, in my case my smb mount dont need any so i put this. the entry for fstab look like this
Code:
//guest@IP_IF_SHARE_SRV/Share /mount_point   ro,-N    0   0
the -N options make mount not to seek password when mounting - nice on boot time. i did not pushed but appears unfriendly to using names instead of ip's
feel free to customized for your need ;)
P.S share you exp about using domain names for server name ;)
 
Back
Top