LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-05-2007, 09:24 PM   #1
Winanjaya
Member
 
Registered: Sep 2003
Posts: 239

Rep: Reputation: 32
Question 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
 
Old 01-06-2007, 12:52 AM   #2
jonwatson
Member
 
Registered: Jun 2004
Location: Nova Scotia, Canada!
Distribution: Ubuntu
Posts: 170

Rep: Reputation: 30
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

Last edited by jonwatson; 01-07-2007 at 11:20 AM.
 
Old 01-07-2007, 04:05 AM   #3
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: Custom Debian Live ISO's
Posts: 1,291

Rep: Reputation: 62
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.

Last edited by fotoguy; 01-07-2007 at 08:22 PM.
 
Old 01-07-2007, 11:17 AM   #4
jonwatson
Member
 
Registered: Jun 2004
Location: Nova Scotia, Canada!
Distribution: Ubuntu
Posts: 170

Rep: Reputation: 30
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.

Last edited by jonwatson; 01-07-2007 at 11:19 AM.
 
  


Reply

Tags
samba


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to list user in Linux box, add an user to a group! steady_lfcfan Linux - Newbie 12 01-27-2013 01:14 PM
samba - add user script - User account does not exist itzamecwp Linux - Server 2 01-18-2007 10:52 PM
user home dir doesn't create when new user add dev_mohamed Linux - Software 3 01-12-2007 01:08 AM
How to automatically add home user after issuing smbpasswd -a depam Linux - Software 0 09-14-2006 09:19 AM
Help! Cannot Add a User to User Manager or Change Root Password lennysokol Linux - General 2 06-25-2005 09:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration