[Samba] Re: What is the purpose of "add user script"?

jamrock news_jamrock at yahoo.com
Tue Mar 31 01:50:23 GMT 2009


"MargoAndTodd" <margoandtodd at gmail.com> wrote in message
news:49D03571.8040101 at gmail.com...
> Hi All,
>
>     I am confused.  In one of the examples of a PDC,
> the following smb.conf parameter is given:
>
>     add user script = /usr/sbin/useradd -m -G users '%u'
>
> If you have "passdb backend = tdbsam" and the way
> to add users to "tdbsam" is "pdbedit -a -u username",
> what is the purpose of the "add user script"?
>
> I am thinking it is to add the user to /etc/passwd,
> but "why"?  I add my users from the command line.
> I invoke "useradd" then "pdbedit".
>
> What is the purpose of the "add user script"?
>
> Many thanks,
> -T
> -- 
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba

To use a Linux box, a user must have a Linux account.  Samba runs as a
service on a Linux box.  Each Samba user must have a Linux account in order
to access the Linux box.

When your create a Samba user, the add user script creates a Linux user with
the same name.  If LDAP is not being used, the Linux user is created in the
/etc/passwd file.

If LDAP is being used, the Linux specific attributes are added to the LDAP
entry.

When you set security on a Linux folder, you are actually setting security
on the user's Linux account.  The Samba user is mapped to the Linux account.
Therefore security restrictions that apply to the Linux user, apply to the
Samba user.

Take a look at chapters 12 and 13 in the Official Samba Howto.  It is
available at www.samba.org.





More information about the samba mailing list