Help with smb.conf - removing authentication

Soldato
Joined
31 Dec 2003
Posts
4,740
Location
Stoke on Trent
Hi all,

I have the following as my smb.conf, all I want to achieve is no password prompt on Windows to access the share, can anyone help me please?

Code:
[Elements]

        path = /mnt/Elements
        browseable = yes
        read only = no
        public = yes
        guest ok = yes
 
Code:
[share]
   comment = share
   path = /mnt/Elements
   guest ok = yes
   browseable = yes
   read only = no
   create mask = 0700
   directory mask = 0700

I gather setting security = share is where you actually went wrong.

Code:
# "security = user" is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
# in the samba-doc package for details.
   security = share

Restart service when changed, then test all is OK.
 
Last edited:
I have tried security = share at one point yes.....should I replace what I have with what you've put then and that will work do you reckon?

What I posted is all that is contained in my smb.conf btw, that is it.

thanks for this
 
Last edited:
I have tried security = share at one point yes.....should I replace what I have with what you've put then and that will work do you reckon?

What I posted is all that is contained in my smb.conf btw, that is it.

thanks for this

Wait, what? Does it work at all? Which distro?

Code:
[global]
   workgroup = WORKGROUP
   server string = %h server
   dns proxy = no
   log file = /var/log/samba/log.%m
   max log size = 1000
   syslog = 0
   panic action = /usr/share/samba/panic-action %d
####### Authentication #######

   security = share
   encrypt passwords = true
   passdb backend = tdbsam
   obey pam restrictions = yes
   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
   pam password change = yes

I have my desktop serving up a guest share for my gf steal files from. This doesn't require a password and comes up when she goes to run \\computername\sharename
 
Last edited:
Wait, what? Does it work at all? Which distro?

Code:
[global]
   workgroup = WORKGROUP
   server string = %h server
   dns proxy = no
   log file = /var/log/samba/log.%m
   max log size = 1000
   syslog = 0
   panic action = /usr/share/samba/panic-action %d
####### Authentication #######

   security = share
   encrypt passwords = true
   passdb backend = tdbsam
   obey pam restrictions = yes
   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
   pam password change = yes

I have my desktop serving up a guest share for my gf steal files from. This doesn't require a password and comes up when she goes to run //computername/sharename

yea it works, it's XBMCLive which is a version of Ubuntu.

It allows me to connect to it from another Linux machine on the network with no password prompt, and it's visible to my Windows 7 box, but it moans. (asks for a password)

My old smb.conf didnt used to be much bigger than this and it achieved what I wanted.....does it prompt your gf for any credentials at all?
 
It does not, no. Stupid question, you are restarting the service when you make changes, yes? Does your service run as the same user which owns the directory? Is your Win7 on the same WORKGROUP.

It's likely I use an older version. With some googling I also saw

[Elements]
comment = Elements Share
path = /mnt/Elements
force user = xbmc {substitute with the username provided during setup. Ex: john}
inherit permissions = yes
read only = no
guest ok = yes

You can also try:


[Elements]
comment = Elements Share
path = /mnt/Elements
guest account = xbmc {substitute with the username provided during setup. Ex: john}
inherit permissions = yes
read only = no
guest ok = yes

I read without the guest account xbmc won't know which user wants to browse the folder, thus will prompt.
 
Last edited:
I've not tried Samba sharing between two Linux boxes but this is how I allow my Win 7 clients access to the fileserver,

Windows username = John
Linux user = share (runs services such as SABnzbd+, uTorrent server, etc)

Code:
/etc/passwd

share:x:1001:1001:File Shares,,,:/home/share:/bin/false


/etc/samba/smb.conf

   security = user
   username map = /etc/samba/users.map

[share]
   comment = Default Shares
   path = /home/share
   browseable = yes
   guest ok = yes
   read only = yes
   valid users = share nobody
   directory mask = 0755
   create mask = 0644
   write list = share
   veto files = .*/incomplete/


/etc/samba/users.map

share = John


/home/share

drwxr-xr-x   7 share share  4096 Nov 16 04:12 docs
drwxr-xr-x 250 share share 20480 Feb 18 20:45 films
drwxr-xr-x  26 share share  4096 Feb 23 14:43 games
drwxr-xr-x   6 share share  4096 Feb 28 00:28 incoming
drwxr-xr-x  19 share share  4096 Dec 18 03:13 install
drwxr-xr-x  33 share share  4096 Feb  5 06:54 music
drwxr-xr-x   2 share share  4096 Aug 12  2011 photos
drwxr-xr-x   3 share share  4096 Oct  2 03:17 temp
drwxr-xr-x  45 share share  4096 Oct 26 10:31 tv_shows
 
cheers for the replies.

It does not, no. Stupid question, you are restarting the service when you make changes, yes?

yep

Does your service run as the same user which owns the directory?

I don't know, how can I tell?

Is your Win7 on the same WORKGROUP.

The Win 7 is definitely in the Workgroup, but i'm not sure the linux box is actually.......do I need to add it somehow?

Using XBMC as the username doesn't work btw, still prompts. :(
 
Back
Top Bottom