-   Linux - Server (
-   -   secure share on samba server (

saiyen2002 05-24-2012 06:12 AM

secure share on samba server
I am running centos 5.5 with samba Version 3.0.33-3.28.el5.

My server type is share since the office users want to be able to browse the file server without any username and passwords.
But now i need to create a share on there that requires user authentication, the finance share.

here is my full config


        netbios name = mps
        cups options = raw
        load printers = yes
        server string = Telecom2 Filer Server
        workgroup = workgroup
        os level = 20
        encrypt passwords = yes
        security = share
        passdb backend = tdbsam
        comment = Home Directories
        browseable = no
        writeable = yes

        comment = All Printers
        path = /var/spool/samba
        browseable = no
        guest ok = no
        writable = no
        printable = yes

      comment = Media Folder
      path = /var/lib/backuppc/share/media
      public = yes
      writable = yes
      printable = no

      comment = All Users Share
      path = /var/lib/backuppc/share/public
      public = yes
      writable = yes
      printable = no

        comment = Document Folders
        writeable = yes
        public = yes
        path = /var/lib/backuppc/share/documents

        comment = Backups folder
        writeable = yes
        public = yes
        path = /var/lib/backuppc/share/backups

        comment = Finance Share
        printable = no
        path = /var/lib/backuppc/share/finance
        valid users = @finance
        force group = finance
        writable = yes
        create mask = 0660
        directory mask = 0771

I have added myself to the smbpasswd. and am part of the group finance


[root@mps share]# smbpasswd -a athiq
New SMB password:
Retype new SMB password:
[root@mps share]# id -G -n athiq
athiq finance

But when I try to login it does not authenticate. keeps prompting me for username and password.

I tried do change server type to user, but in this case everyone has to enter a username and password, which is not what i want to do.


lithos 05-24-2012 08:08 AM


I don't see if you have added a local user on your server, not just samba password (passdb backend = tdbsam <- needs local user)

I would give you some how-to's:
- how to setup samba with tdbsam
- samba server with tdbsam

good luck

saiyen2002 05-24-2012 10:01 AM

local use does exist. You can tell by looking at the outpu of the id command. it shows the user athiq is a part of the group athiq and finance

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