diff options
author | Jeremy Allison <jra@samba.org> | 1998-03-24 21:04:36 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-03-24 21:04:36 +0000 |
commit | c66966ff00b0968f765e62b679279b7417988df9 (patch) | |
tree | c71715238a8b5d98b3b40c60fb206d9817b1b9e6 /source/passdb | |
parent | 6eca266fe5a3368ab207bdf8729421b57f47f22e (diff) | |
download | samba-c66966ff00b0968f765e62b679279b7417988df9.tar.gz samba-c66966ff00b0968f765e62b679279b7417988df9.tar.xz samba-c66966ff00b0968f765e62b679279b7417988df9.zip |
Updated smbpasswd to allow root to add machine accounts, and allow
root to disable users and set them to "NO PASSWORD".
Not quite finished with machine account stuff yet, but everything
compiles.
Jeremy.
Diffstat (limited to 'source/passdb')
-rw-r--r-- | source/passdb/smbpass.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/passdb/smbpass.c b/source/passdb/smbpass.c index a1913c4959e..6d23fd62e60 100644 --- a/source/passdb/smbpass.c +++ b/source/passdb/smbpass.c @@ -187,6 +187,8 @@ struct smb_passwd *getsmbpwent(FILE *fp) return NULL; } + pw_buf.acct_ctrl = ACB_NORMAL; + /* * Scan the file, a line at a time and check if the name matches. */ @@ -406,10 +408,10 @@ struct smb_passwd *getsmbpwent(FILE *fp) * password file as 'normal accounts'. If this changes * we will have to fix this code. JRA. */ - if(pw_buf.smb_name[strlen(pw_buf.smb_name) - 1] == '$') - pw_buf.acct_ctrl = ACB_WSTRUST; - else - pw_buf.acct_ctrl = ACB_NORMAL; + if(pw_buf.smb_name[strlen(pw_buf.smb_name) - 1] == '$') { + pw_buf.acct_ctrl &= ~ACB_NORMAL; + pw_buf.acct_ctrl |= ACB_WSTRUST; + } } return &pw_buf; |