summaryrefslogtreecommitdiffstats
path: root/source3/passdb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-03-24 21:04:36 +0000
committerJeremy Allison <jra@samba.org>1998-03-24 21:04:36 +0000
commit242e7ae4d66dffe73e427871d9626c7f49231d2d (patch)
tree47951ef65a0d34520ba9a650c970c84d628e974e /source3/passdb
parente2060b58e0b032148bfed595b033262c799f1c55 (diff)
downloadsamba-242e7ae4d66dffe73e427871d9626c7f49231d2d.tar.gz
samba-242e7ae4d66dffe73e427871d9626c7f49231d2d.tar.xz
samba-242e7ae4d66dffe73e427871d9626c7f49231d2d.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. (This used to be commit c66966ff00b0968f765e62b679279b7417988df9)
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/smbpass.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/passdb/smbpass.c b/source3/passdb/smbpass.c
index a1913c4959e..6d23fd62e60 100644
--- a/source3/passdb/smbpass.c
+++ b/source3/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;