Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

im new to linux and Samba.


Create a called Shared_folder which can be accessed by ALL users (group name = users). Therefore, in order to map the drive in windows, the user is promoted to enter valid user credentials.


I have the following Shared_folder with the following permissions:

drwxr-xr-x 2 nobody users 4096 Dec 27 00:24 Shared_folder 

..and the following Samba config:

    printable = no
    writeable = yes
    path = /home/Shared_folder
    force group = users
    comment = Common Documenets accessible by all users
    valid users = @users
    create mode = 757
    public = no
    directory mode = 777

But it when I try to map the drive in windows im unable to pass the user validation part as it keeps failing.

Could someone please shed some light as to how to get this working. Any help would be greatly appreciated.

Thanks in advance.

share|improve this question

migrated from Dec 27 '12 at 5:52

This question came from our site for professional and enthusiast programmers.

i hope you have restarted samba server after modifying smb config – Kasun Dec 27 '12 at 1:28
which OS you are installing samba server – Kasun Dec 27 '12 at 1:33
Using Turnkey Linux File Server ( which is running on Debian 6.0.5 (Squeeze). Also I have reestarted the samba server a every time i have made a change – AJsStack Dec 27 '12 at 2:00
can u attache samba log (/var/log/samba/log.smbd) – Kasun Dec 27 '12 at 2:41

if you got error chcon: can't apply partial context to unlabeled file '/home/Shared_folder', using full label for directory. because this directory dosen`t have any label, so it cant get a partial label.(you can see current label with ls -Z).
use below command to set full label for it:

chcon -h system_u:object_r:samba_share_t /home/Shared_folder
chcon -R -h system_u:object_r:samba_share_t /home/Shared_folder*
share|improve this answer

few things that might cause to occur you problem

  1. samba server not starting because following error

Log file /var/log/samba/log.smbd

 smbd/server.c:501(smbd_open_one_socket) smbd_open_once_socket: open_socket_in: Address already in use

sysctl net.ipv6.bindv6only=1

2. samba password for the user not configured

smbpasswd -a username

share|improve this answer
I added the logs above as requested. If there are still no obvious reasons why this should occur, could you please provide steps to create a Shared_folder which can be accessed by ALL users (group name = users). – AJsStack Dec 27 '12 at 18:50

If you are using SELinux you need to run this command as root:

chcon -t samba_share_t /home/Shared_folder
share|improve this answer
Im getting the following: chcon: can't apply partial context to unlabeled file '/home/Shared_folder' Also what does this do? and what is samba_share_t? – AJsStack Dec 29 '12 at 17:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .