0

I have multiple user accounts on my Ubuntu Desktop 14.04 install. I have my a Samba share mounted under my administrator account using Nautilus (Ctrl+L) using credentials (smb://user@server/share). I switched to a standard user account and performed the same operation except without credentials (smb://server/share) and I was able to access everything that the administrator account had access to. Is this a bug or a configuration mistake?

Samba Configuration:

[global]
   workgroup = WORKGROUP  
   admin users = nick  
   log level = all:2  
   inherit permissions = yes  
   inherit acls = yes  
   map acl inherit = yes  
   server string = %h  
   dns proxy = no  
   name resolve order = lmhosts host wins bcast  
   interfaces = eth0  
   bind interfaces only = yes  
   log file = /var/log/samba/log.%m  
   max log size = 1000  
   syslog = 0  
   panic action = /usr/share/samba/panic-action %d  
   security = user  
   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  
   map to guest = bad user  
   socket options = TCP_NODELAY  
   usershare allow guests = no  

include = /etc/samba/shares.conf

[printers]  
   comment = All Printers  
   browseable = yes  
   path = /var/spool/samba  
   printable = yes  
   guest ok = yes  
   read only = yes  
   create mask = 0700  

[print$]  
   comment = Printer Drivers  
   path = /var/lib/samba/printers  
   browseable = yes  
   read only = yes  
   guest ok = yes  

Shares Conf:

[Home]
   comment = Home Directory  
   path = /home  
   guest ok = no  
   browseable = no  
   writeable = yes  
   inherit owner = yes  
   inherit permissions = yes  
   valid users = nick,brittany  

[Shares]
   comment = Default shares  
   path = /shares  
   guest ok = yes  
   browseable = yes  
   writeable = yes  
   inherit acls = yes  
   inherit permissions = no  
   hide unreadable = yes  
   directory mask = 755  
   force directory mode = 1750  
   force directory security mode = 700  
   create mask = 755  
   force create mode = 1750  
   force security mode = 700  
   security mask = 077  
   directory security mask = 077  
David Foerster
  • 36,890
  • 56
  • 97
  • 151

1 Answers1

0

With the additional information you posted, it is a misconfiguration server side.

The behavior you are seeing is because the server is configured to allow fairly unrestricted access.

Under [Shares] you have

guest ok = yes

from http://www.cyberciti.biz/tips/how-do-i-set-permissions-to-samba-shares.html

guest ok: If this parameter is set to yes, the users will have access to the share without having to enter a password. This can pose security risk.

Depending on how you wish to configure your share you have a number of options to be more restrictive.

I suggest

guest ok = no

You may also want

browseable = no

Sort of depends on exactly what access you wish for which shares.

See

https://help.ubuntu.com/community/Samba/SambaServerGuide

http://www.cyberciti.biz/tips/how-do-i-set-permissions-to-samba-shares.html

http://beginlinux.com/blog/2010/01/samba-tutorial-create-private-user-shares/

and How can I set up Samba shares to only be accessed by certain users?

Panther
  • 104,528