Samba with no passwords

Tim Wunder tim
Mon May 17 11:50:37 PDT 2004


On 8/5/2003 2:08 PM, someone claiming to be Collins Richey wrote:

> On Tue, 05 Aug 2003 12:58:27 -0400
> Tim Wunder <tim at thewunders.org> wrote:
> 
> 
>>On 8/5/2003 11:52 AM, someone claiming to be Collins Richey wrote:
>>
>>
>>>On Tue, 5 Aug 2003 08:04:51 -0600
>>>Collins Richey <erichey2 at comcast.net> wrote:
>>>
>>>
>>>
>>>>On Sun, 3 Aug 2003 19:59:41 -0600
>>>>Collins Richey <erichey2 at comcast.net> wrote:
>>>>
>>>>
>>>>
>>>>>On Sun, 03 Aug 2003 20:16:18 -0500
>>>>>Michael Hipp <Michael at Hipp.com> wrote:
>>>>>
>>>>>
>>>>>
>>>>>>Collins Richey wrote:
>>>>>>
>>>>>>
>>>>>>>Is there any way to cause the mount not to prompt for a passwd? 
>>>>>>>Hint, I have no defined users and do not log in to the WinXP
>>>>>>>box.
>>>>>>>
>>>>
>>>>>>If you put the appropriate line in /etc/fstab with password=,user=
>>>>>>then you can just do 'mount /mnt/samba'. (Or it may have to be
>>>>>>user=guest).
>>>>>>
>>>>>
>>>>>Thanks.  It works with user=guest.
>>>>>
>>>>
>>>>OK, now to dig a little deeper.  The set of directories (it varies)
>>>>that I'm wanting to access "appear" to have no common high level
>>>>directory(they are anchored on the WinXP desktop), so I need to do a
>>>>separate mount for each. Short of putting a big list in fstab, is
>>>>there any way to get a given directory mounted for general use upon
>>>>demand, either by command or by root command and make the
>>>
>>>permissions>such that normal users can manipulate it?
>>>
>>>
>>>After further experimentation
>>>
>>>This works as root (no passwd prompt, no errors of any sort)
>>>
>>>mount -t smbfs -o guest //name/Collins /mnt/smb-collins
>>>
>>>But it does not work from normal user relying on fstab entry
>>>
>>>//name/Collins /mnt/smb-collins     smbfs \
>>>noauto,user,guest  0 0
>>>
>>>I get
>>>
>>>mount //name/Collins
>>>cannot mount on /mnt/smb-collins: Operation not permitted
>>>smbmnt failed: 1
>>>
>>>Any ideas?
>>>
>>
>>Don't you need a username=guest line in there somewhere?
>>Check 'man smbmount'
>>
> 
> 
> I've also tried that.  The mount command works with either -o guest or
> -o user=guest,password= , but I've found no combination that will work
> in fstab.
> 

Can't help you too much as I don't have a Windows share that doesn't 
have a password. But, I set the PASSWD environment variable, and added:
//192.168.1.8/Tim /mnt/share smbfs noauto,user,rw  0 0
to /etc/fstab and was able to mount the share with
'mount /mnt/share'

So perhaps setting USER=guest would work. Dunno if that's workable for 
you or not...

Did you try:
//name/Collins /mnt/smb-collins smbfs \
   noauto,user,rw,username=guest 0 0

Good luck,
Tim






More information about the Linux-users mailing list