Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

im new to linux and Samba.

Aim

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.

Issue

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:

[Shared_folder]
    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 stackoverflow.com Dec 27 '12 at 5:52

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

1  
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 (turnkeylinux.org/fileserver) 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

3 Answers 3

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

https://bugzilla.redhat.com/show_bug.cgi?id=726936

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

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.