Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Nov 2005 01:08:10 +0000
From:      Alex Zbyslaw <xfb52@dial.pipex.com>
To:        Robert Fitzpatrick <robert@webtent.com>
Cc:        FreeBSD <freebsd-questions@freebsd.org>
Subject:   Re: Accessing samba shares without password prompts
Message-ID:  <4383C0FA.3000600@dial.pipex.com>
In-Reply-To: <1132624011.3289.2.camel@felipa.webtent.org>
References:  <1132624011.3289.2.camel@felipa.webtent.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Robert Fitzpatrick wrote:

>Can someone point me to info on how to access shares on the netowrk
>without having to provide the password. I am logged in to my FreeBSD 6.0
>workstation with the user name and password equal to that of a user on
>the other samba servers and Windows.
>  
>
IIUC and AFAIK, you can't.  Unlike windows, Unix does not store your 
password when you log in (just encrypts and compares to passwd file) so 
it cannot automatically provide credentials to samba.

You can, however, get mount_smbfs to look in a file to find your 
password, so as long as that file is protected.  See man mount_smbfs

     -N      Do not ask for a password.  At run time, mount_smbfs reads the
             ~/.nsmbrc file for additional configuration parameters and a
             password.  If no password is found, mount_smbfs prompts for it.

If you're going to do this you might want to use a different password 
for windows from BSD.  And make sure you protect the file, though any 
super-user will always be able to read it, if that is an issue.

--Alex




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4383C0FA.3000600>