diff options
author | Andrew Bartlett <abartlet@samba.org> | 2002-09-04 08:08:03 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2002-09-04 08:08:03 +0000 |
commit | 4b27cda2858961fcdaefcb9b47a4f7b3310566c3 (patch) | |
tree | 8a426bd681473c10af2b01ff62734c558bdd63af /source3 | |
parent | 45f9cbe03374e8addeed0720a9d7dad8f6fb9f68 (diff) | |
download | samba-4b27cda2858961fcdaefcb9b47a4f7b3310566c3.tar.gz samba-4b27cda2858961fcdaefcb9b47a4f7b3310566c3.tar.xz samba-4b27cda2858961fcdaefcb9b47a4f7b3310566c3.zip |
Set default ACB attributes on 'unixsam' accounts. This means that machine
accounts added first to /etc/passwd will be honered correctly. Also, users
'upgraded' to smbpasswd will have the right flags.
Andrew Bartlett
(This used to be commit 474cc910c73e5567313bac438c7324a80e2e90d8)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/passdb/passdb.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index 7a8c40346f..05450c9f2f 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -251,6 +251,15 @@ NTSTATUS pdb_fill_sam_pw(SAM_ACCOUNT *sam_account, const struct passwd *pwd) pwd->pw_name, global_myname, pwd->pw_uid, pwd->pw_gid), False); + if (!pdb_set_acct_ctrl(sam_account, ACB_NORMAL)) { + DEBUG(1, ("Failed to set 'normal account' flags for user %s.\n", pwd->pw_name)); + return NT_STATUS_UNSUCCESSFUL; + } + } else { + if (!pdb_set_acct_ctrl(sam_account, ACB_WSTRUST)) { + DEBUG(1, ("Failed to set 'trusted workstation account' flags for user %s.\n", pwd->pw_name)); + return NT_STATUS_UNSUCCESSFUL; + } } return NT_STATUS_OK; } |