From 4b27cda2858961fcdaefcb9b47a4f7b3310566c3 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 4 Sep 2002 08:08:03 +0000 Subject: 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) --- source3/passdb/passdb.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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; } -- cgit