LinuxQuestions.org

LinuxQuestions.org (http://www.linuxquestions.org/questions/index.php)
-   Linux - Networking (http://www.linuxquestions.org/questions/forumdisplay.php?f=3)
-   -   Unable to connect to map samba shared folder in windows (http://www.linuxquestions.org/questions/showthread.php?t=4175443056)

atiqjaved 12-26-2012 08:47 PM

Unable to connect to map samba shared folder in windows
 
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:

Code:

drwxr-xr-x 2 nobody users 4096 Dec 27 00:24 Shared_folder
..and the following Samba config:

Code:

[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. I have restarted the Samba server but still no difference.

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

Thanks in advance.

jschiwal 12-26-2012 09:10 PM

When you add the users with useradd, add the "-G users" argument to make the users members of the "users" group.

After editing smb.conf, run testparm to check for errors.

Check the logs in /var/log/samba/. Some hard to debug errors may be found there such as SELinux or AppArmor restrictions.

I think the force group will force the group for file creation and access, but not for authentication. If only members of @users are allowed access, using "force group" is redundant.

Also look at group passwords. I've never used them. Normally a user will authenticate with their own password and @users is used for access control. You may need to research and experiment to get it working as you want.

Post the global section of smb.conf. We can't tell what security model you are using.

atiqjaved 12-27-2012 12:32 PM

Code:

[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



All times are GMT -5. The time now is 10:18 PM.