diff options
author | Gerald Carter <jerry@samba.org> | 2003-07-09 16:44:47 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2003-07-09 16:44:47 +0000 |
commit | 16ff7b26f6b9d288cbd1d39e075b637e24da13a6 (patch) | |
tree | b20088c7adac8df8823defc6649db0a9607c0c6a /source3/auth | |
parent | 816724fb39ba1d13f553704b2deaa3e8e716c5ab (diff) | |
download | samba-16ff7b26f6b9d288cbd1d39e075b637e24da13a6.tar.gz samba-16ff7b26f6b9d288cbd1d39e075b637e24da13a6.tar.bz2 samba-16ff7b26f6b9d288cbd1d39e075b637e24da13a6.zip |
Large set of changes to add UNIX account/group management
to winbindd. See README.idmap-and-winbind-changes for details.
(This used to be commit 1111bc7b0c7165e1cdf8d90eb49f4c368d2eded6)
Diffstat (limited to 'source3/auth')
-rw-r--r-- | source3/auth/auth_util.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index 6fc1d772ec..51cd1994f9 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -60,16 +60,23 @@ static int smb_create_user(const char *domain, const char *unix_username, const void auth_add_user_script(const char *domain, const char *username) { - struct passwd *pwd=NULL; - /* * User validated ok against Domain controller. * If the admin wants us to try and create a UNIX * user on the fly, do so. */ - if(lp_adduser_script() && !(pwd = Get_Pwnam(username))) { + if ( lp_adduser_script() ) smb_create_user(domain, username, NULL); + else { + DEBUG(10,("auth_add_user_script: no 'add user script'. Asking winbindd\n")); + + /* should never get here is we a re a domain member running winbindd + However, a host set for 'security = server' might run winbindd for + account allocation */ + + if ( !winbind_create_user(username) ) + DEBUG(5,("auth_add_user_script: winbindd_create_user() failed\n")); } } |