[Samba] Re: 'credentials' file doesn't work - also observed by others

Igor Belyi sambauser at katehok.ac93.org
Sun Oct 17 23:38:16 GMT 2004


Could you try something like that:
in /etc/fstab:
//<server>/<share> /mnt/point smbfs 
workgroup=<domain>,credentials=/etc/smbpassword 0 0
in /etc/smbpassword:
username=<user>
password=<password>

Note that you should not add domain to the <user> in credentials file 
but put it as a separate option for smbmount.

Hope it helps,
Igor

Michael Woodhams wrote:
> Background: Linux, Debian (Sarge). I want to auto-mount an smbfs at
> boot. smbmount version is 3.0.7-Debian.
> 
> With the following in my fstab, I can do the mount as root, but have to
> provide a password (hence either I can't boot unattended, or can't mount
> it during boot):
> 
> //<server>/<share>  /mnt/point smbfs  
> user,noauto,username=<user>/<domain>,uid=<user>,gid=<user>   0   0
> 
> I can make it automount by providing the password:
> 
> //<server>/<share>  /mnt/point smbfs  
> user,noauto,username=<user>/<domain>,uid=<user>,gid=<user>,password=<password>   0   0
> 
> but this is insecure. I tried using credentials:
> 
> //<server>/<share>  /mnt/point smbfs  
> user,noauto,username=<user>/<domain>,uid=<user>,gid=<user>,credentials=/etc/smbpassword   0   0
> 
> where /etc/smbpassword contains
> 
> username=<user>/<domain>
> password=<password>
> 
> but I get an error:
> 1741: session setup failed: ERRDOS - ERRnoaccess (Access denied.)
> SMB connection failed
> 
> (I think '1741' is a PID - it changes each time.) 
> 
> To forstall some suggestions:
> 
> * There are no non-alphanumeric charaters in <user>, <domain>,
> <password> etc.
> * There is a newline at the end of /etc/smbpassword
> * I've tried from the command line using 'smbmount', with the same
> results - works with "password=" but not with "credentials="
> * I've tried giving the credentials file liberal permissions (666)
> * The password in the credentials file is correct - I've cut-and-pasted
> it to command line and had it work
> * I've tried (from command line) without the extra options like 'user'
> and 'noauto'.
> * Yes, I've googled - I found several others with the same problem, but
> no solution. 
> http://lists.samba.org/archive/samba/2003-November/002040.html
> http://archives.mandrakelinux.com/cooker/2004-01/msg00114.php
> 
> Michael W.
> 
> 



More information about the samba mailing list