*** source/utils/pdbedit.c.orig 2006-02-23 11:29:34.000000000 -0500 --- source/utils/pdbedit.c 2006-03-07 16:39:37.000000000 -0500 *************** *** 31,36 **** --- 31,37 ---- #define BIT_RESERV_3 0x00000080 #define BIT_FULLNAME 0x00000100 #define BIT_HOMEDIR 0x00000200 + #define BIT_WORKSTATIONS 0x00000300 #define BIT_HDIRDRIVE 0x00000400 #define BIT_LOGSCRIPT 0x00000800 #define BIT_PROFILE 0x00001000 *************** *** 365,371 **** const char *user_sid, const char *group_sid, const char *user_domain, const BOOL badpw, const BOOL hours, ! time_t pwd_can_change, time_t pwd_must_change) { BOOL updated_autolock = False, updated_badpw = False; SAM_ACCOUNT *sam_pwent=NULL; --- 366,373 ---- const char *user_sid, const char *group_sid, const char *user_domain, const BOOL badpw, const BOOL hours, ! time_t pwd_can_change, time_t pwd_must_change, ! const char *workstations) { BOOL updated_autolock = False, updated_badpw = False; SAM_ACCOUNT *sam_pwent=NULL; *************** *** 418,423 **** --- 420,427 ---- pdb_set_logon_script(sam_pwent, script, PDB_CHANGED); if (profile) pdb_set_profile_path (sam_pwent, profile, PDB_CHANGED); + if (workstations) + pdb_set_workstations(sam_pwent, workstations, PDB_CHANGED); if (user_domain) pdb_set_domain(sam_pwent, user_domain, PDB_CHANGED); *************** *** 731,736 **** --- 735,741 ---- static char *pwd_must_change_time = NULL; static char *pwd_time_format = NULL; static BOOL pw_from_stdin = False; + static char *workstations = NULL; struct pdb_context *bin; struct pdb_context *bout; *************** *** 771,776 **** --- 776,782 ---- {"pwd-must-change-time", 0, POPT_ARG_STRING, &pwd_must_change_time, 0, "Set password must change time (unix time in seconds since 1970 if time format not provided)", NULL }, {"time-format", 0, POPT_ARG_STRING, &pwd_time_format, 0, "The time format for time parameters", NULL }, {"password-from-stdin", 't', POPT_ARG_NONE, &pw_from_stdin, 0, "get password from standard in", NULL}, + {"workstations", 'W', POPT_ARG_STRING, &workstations, 0, "set allowed workstations", NULL}, POPT_COMMON_SAMBA POPT_TABLEEND }; *************** *** 811,816 **** --- 817,823 ---- (spstyle ? BIT_SPSTYLE : 0) + (full_name ? BIT_FULLNAME : 0) + (home_dir ? BIT_HOMEDIR : 0) + + (workstations ? BIT_WORKSTATIONS : 0) + (home_drive ? BIT_HDIRDRIVE : 0) + (logon_script ? BIT_LOGSCRIPT : 0) + (profile_path ? BIT_PROFILE : 0) + *************** *** 1058,1064 **** user_sid, group_sid, user_domain, badpw_reset, hours_reset, ! pwd_can_change, pwd_must_change); error: fprintf (stderr, "Error parsing the time in pwd-%s-change-time!\n", errstr); return -1; --- 1065,1072 ---- user_sid, group_sid, user_domain, badpw_reset, hours_reset, ! pwd_can_change, pwd_must_change, ! workstations); error: fprintf (stderr, "Error parsing the time in pwd-%s-change-time!\n", errstr); return -1;