Tell me more ×
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
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

migrated from stackoverflow.com Dec 27 '12 at 5:52

3 Answers

Thanks for your reply. I checked the logs, no sign of the above.

The /var/log/samba/log.smbd:

    [2011/06/29 21:48:16,  0] smbd/server.c:1069(main)
  smbd version 3.4.7 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2009
[2011/06/29 22:06:11,  0] smbd/server.c:1069(main)
  smbd version 3.4.7 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2009
[2011/07/03 11:53:58,  0] smbd/server.c:1069(main)
  smbd version 3.4.7 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2009
[2011/12/06 12:21:56,  0] smbd/server.c:1069(main)
  smbd version 3.4.7 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2009
[2012/12/25 23:19:43,  0] smbd/server.c:1069(main)
  smbd version 3.4.7 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2009
[2012/12/26 00:38:52,  0] smbd/server.c:1069(main)
  smbd version 3.4.7 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2009
[2012/12/26 17:14:59,  0] smbd/server.c:1069(main)
  smbd version 3.4.7 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2009
[2012/12/26 17:50:10,  0] smbd/server.c:1069(main)
  smbd version 3.4.7 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2009
[2012/12/26 18:33:40,  0] smbd/server.c:1069(main)
  smbd version 3.4.7 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2009
[2012/12/26 23:42:55,  0] smbd/server.c:1069(main)
  smbd version 3.4.7 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2009
[2012/12/27 00:28:43,  0] smbd/server.c:1069(main)
  smbd version 3.4.7 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2009
[2012/12/27 00:31:48,  0] smbd/server.c:1069(main)
  smbd version 3.4.7 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2009
[2012/12/27 00:35:04,  0] smbd/server.c:1069(main)
  smbd version 3.4.7 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2009
[2012/12/27 00:38:38,  0] smbd/server.c:1069(main)
  smbd version 3.4.7 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2009
[2012/12/27 00:39:55,  0] smbd/server.c:1069(main)
  smbd version 3.4.7 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2009
[2012/12/27 00:59:11,  0] smbd/server.c:1069(main)
  smbd version 3.4.7 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2009
[2012/12/27 01:04:59,  0] smbd/server.c:1069(main)
  smbd version 3.4.7 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2009
[2012/12/27 01:53:57,  0] smbd/server.c:1069(main)
  smbd version 3.4.7 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2009
[2012/12/27 02:10:52,  0] smbd/server.c:1069(main)
  smbd version 3.4.7 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2009

Below is the complete smb.con file:

    [global]
    log file = /var/log/samba/samba.log
    guest account = nobody
    add group script = /usr/sbin/groupadd '%g'
    passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
    socket options = TCP_NODELAY
    delete group script = /usr/sbin/groupdel '%g'
    obey pam restrictions = yes
    admin users = root
    add user to group script = /usr/sbin/usermod -G '%g' '%u'
    null passwords = yes
    encrypt passwords = yes
    passwd program = /usr/bin/passwd %u
    passdb backend = tdbsam
    wins support = true
    dns proxy = no
    netbios name = FILESERVER
    server string = TurnKey FileServer
    unix password sync = yes
    workgroup = MIRAJ
    os level = 20
    add user script = /usr/sbin/useradd -m '%u' -g users -G users
    syslog = 0
    security = share
    panic action = /usr/share/samba/panic-action %d
    max log size = 1000
    delete user script = /usr/sbin/userdel -r '%u'
    pam password change = yes








[homes]
    browseable = no
    comment = Home Directory
    writeable = yes
    valid users = %S,atiq

[cdrom]
    comment = CD-ROM
    read only = yes
    locking = no
    guest ok = yes
    path = /media/cdrom
    preexec = /bin/mount /media/cdrom
    postexec = /bin/umount /media/cdrom

[storage]
    comment = Public Share
    path = /srv/storage
    browseable = yes
    read only = no
    create mask = 0644
    directory mask = 0755


[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

[PUBLIC]
    comment = Public Folder
    writeable = yes
    guest only = yes
    public = yes
    path = /home/public
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

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

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.