LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to automatically add smb user when unix user added (http://www.linuxquestions.org/questions/linux-newbie-8/how-to-automatically-add-smb-user-when-unix-user-added-516773/)

Winanjaya 01-05-2007 09:24 PM

How to automatically add smb user when unix user added
 
Dear Expert,

How to automatically add smb user when unix user added? .. I am running samba on FC5..?

Thanks & Regards
Winanjaya

jonwatson 01-06-2007 12:52 AM

I use Webmin to manage the various server on my boxes and within the Samba page there are several options pertaining to syncing UNIX users and SAMBA users. I looked at my config file and the only obvious line in it the appears to deal with this situation is:

Code:

unix password sync = yes
However, I'll post the entire GLOBAL section of my config in case it's something else.

Code:

        log file = /var/log/samba/%m.log
        ldap ssl = no
        socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192
        interfaces = 10.0.50.0/24 127.0.0.1
        bind interfaces only = yes
        hosts allow = 10.0.50. 10.0.60. 127.
        security = user
        local master = yes
        preferred master = yes
        domain master = Yes
        encrypt passwords = yes
        passwd program = /usr/bin/passwd %u
        wins support = Yes
        netbios aliases = PROFILE, SERVER
        writeable = yes
        printing = lprng
        server string = munged
        unix password sync = yes
        workgroup = munged
        os level = 64
        create mode = 660
        directory mode = 770
        log level = 1

HTH

J

fotoguy 01-07-2007 04:05 AM

Quote:

Originally Posted by jonwatson
I use Webmin to manage the various server on my boxes and within the Samba page there are several options pertaining to syncing UNIX users and SAMBA users. I looked at my config file and the only obvious line in it the appears to deal with this situation is:

The password sync only works with syncing passwords. it won't add a user to samba when you add a user to the unix/linux system. I would edit the /usr/sbin/adduser script, if it has one. At the very end of the script just before it exits place this:

Code:

smbpasswd -a "$LOGIN"
After the unix account had been created you will then asked for the samba password for the user. This only works if you add a user by the command line, not sure how to do this with a gui.

jonwatson 01-07-2007 11:17 AM

Hmm...I don't have that line in my /usr/sbin/adduser file and I have UNIX/SAMAB user sync working.

Maybe the best place to ask would be around the Webmin forums. I know that checking the approrpiate boxes in Webmin activates this functionality but I admit to now knowing how it does it. It would be interesting to know.


All times are GMT -5. The time now is 08:31 AM.