• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/router/samba-3.0.25b/source/utils/

Lines Matching defs:sam_pwent

218 static int print_sam_info (struct samu *sam_pwent, BOOL verbosity, BOOL smbpwdstyle)
224 if (!sam_pwent) return -1;
230 printf ("Unix username: %s\n", pdb_get_username(sam_pwent));
231 printf ("NT username: %s\n", pdb_get_nt_username(sam_pwent));
232 printf ("Account Flags: %s\n", pdb_encode_acct_ctrl(pdb_get_acct_ctrl(sam_pwent), NEW_PW_FORMAT_SPACE_PADDED_LEN));
234 sid_string_static(pdb_get_user_sid(sam_pwent)));
236 sid_string_static(pdb_get_group_sid(sam_pwent)));
237 printf ("Full Name: %s\n", pdb_get_fullname(sam_pwent));
238 printf ("Home Directory: %s\n", pdb_get_homedir(sam_pwent));
239 printf ("HomeDir Drive: %s\n", pdb_get_dir_drive(sam_pwent));
240 printf ("Logon Script: %s\n", pdb_get_logon_script(sam_pwent));
241 printf ("Profile Path: %s\n", pdb_get_profile_path(sam_pwent));
242 printf ("Domain: %s\n", pdb_get_domain(sam_pwent));
243 printf ("Account desc: %s\n", pdb_get_acct_desc(sam_pwent));
244 printf ("Workstations: %s\n", pdb_get_workstations(sam_pwent));
245 printf ("Munged dial: %s\n", pdb_get_munged_dial(sam_pwent));
247 tmp = pdb_get_logon_time(sam_pwent);
250 tmp = pdb_get_logoff_time(sam_pwent);
253 tmp = pdb_get_kickoff_time(sam_pwent);
256 tmp = pdb_get_pass_last_set_time(sam_pwent);
259 tmp = pdb_get_pass_can_change_time(sam_pwent);
262 tmp = pdb_get_pass_must_change_time(sam_pwent);
265 tmp = pdb_get_bad_password_time(sam_pwent);
268 pdb_get_bad_password_count(sam_pwent));
270 hours = pdb_get_hours(sam_pwent);
278 uid = nametouid(pdb_get_username(sam_pwent));
279 pdb_sethexpwd(lm_passwd, pdb_get_lanman_passwd(sam_pwent), pdb_get_acct_ctrl(sam_pwent));
280 pdb_sethexpwd(nt_passwd, pdb_get_nt_passwd(sam_pwent), pdb_get_acct_ctrl(sam_pwent));
283 pdb_get_username(sam_pwent),
287 pdb_encode_acct_ctrl(pdb_get_acct_ctrl(sam_pwent),NEW_PW_FORMAT_SPACE_PADDED_LEN),
288 (uint32)convert_time_t_to_uint32(pdb_get_pass_last_set_time(sam_pwent)));
290 uid = nametouid(pdb_get_username(sam_pwent));
291 printf ("%s:%lu:%s\n", pdb_get_username(sam_pwent), (unsigned long)uid,
292 pdb_get_fullname(sam_pwent));
304 struct samu *sam_pwent=NULL;
307 if ( (sam_pwent = samu_new( NULL )) == NULL ) {
311 ret = NT_STATUS_IS_OK(in->getsampwnam (in, sam_pwent, username));
315 TALLOC_FREE(sam_pwent);
319 ret=print_sam_info (sam_pwent, verbosity, smbpwdstyle);
320 TALLOC_FREE(sam_pwent);
330 struct samu *sam_pwent=NULL;
339 if ( (sam_pwent = samu_new( NULL )) == NULL ) {
343 while (check && NT_STATUS_IS_OK(in->getsampwent (in, sam_pwent))) {
346 print_sam_info (sam_pwent, verbosity, smbpwdstyle);
347 TALLOC_FREE(sam_pwent);
349 if ( (sam_pwent = samu_new( NULL )) == NULL ) {
354 TALLOC_FREE(sam_pwent);
365 struct samu *sam_pwent=NULL;
374 if ( (sam_pwent = samu_new( NULL )) == NULL ) {
378 while (check && NT_STATUS_IS_OK(in->getsampwent (in, sam_pwent))) {
379 printf("Updating record for user %s\n", pdb_get_username(sam_pwent));
381 if (!NT_STATUS_IS_OK(pdb_update_sam_account(sam_pwent))) {
382 printf("Update of user %s failed!\n", pdb_get_username(sam_pwent));
384 TALLOC_FREE(sam_pwent);
385 if ( (sam_pwent = samu_new( NULL )) == NULL ) {
394 TALLOC_FREE(sam_pwent);
413 struct samu *sam_pwent=NULL;
416 if ( (sam_pwent = samu_new( NULL )) == NULL ) {
420 ret = NT_STATUS_IS_OK(in->getsampwnam (in, sam_pwent, username));
423 TALLOC_FREE(sam_pwent);
431 hours_len = pdb_get_hours_len(sam_pwent);
434 pdb_set_hours(sam_pwent, hours_array, PDB_CHANGED);
437 if (!pdb_update_autolock_flag(sam_pwent, &updated_autolock)) {
441 if (!pdb_update_bad_password_count(sam_pwent, &updated_badpw)) {
446 pdb_set_fullname(sam_pwent, fullname, PDB_CHANGED);
448 pdb_set_acct_desc(sam_pwent, acct_desc, PDB_CHANGED);
450 pdb_set_homedir(sam_pwent, homedir, PDB_CHANGED);
452 pdb_set_dir_drive(sam_pwent,drive, PDB_CHANGED);
454 pdb_set_logon_script(sam_pwent, script, PDB_CHANGED);
456 pdb_set_profile_path (sam_pwent, profile, PDB_CHANGED);
458 pdb_set_domain(sam_pwent, user_domain, PDB_CHANGED);
468 TALLOC_FREE(sam_pwent);
472 pdb_set_acct_ctrl(sam_pwent,
473 (pdb_get_acct_ctrl(sam_pwent) & not_settable) | newflag,
489 pdb_set_user_sid (sam_pwent, &u_sid, PDB_CHANGED);
493 pdb_set_bad_password_count(sam_pwent, 0, PDB_CHANGED);
494 pdb_set_bad_password_time(sam_pwent, 0, PDB_CHANGED);
497 if (NT_STATUS_IS_OK(in->update_sam_account (in, sam_pwent)))
501 TALLOC_FREE(sam_pwent);
504 TALLOC_FREE(sam_pwent);
516 struct samu *sam_pwent;
528 if ( (sam_pwent = samu_new( NULL )) == NULL ) {
533 if (!NT_STATUS_IS_OK(samu_alloc_rid_unix(sam_pwent, pwd ))) {
534 TALLOC_FREE( sam_pwent );
544 TALLOC_FREE(sam_pwent);
546 pdb_set_plaintext_passwd(sam_pwent, password1);
559 pdb_set_fullname(sam_pwent, fullname, PDB_CHANGED);
561 pdb_set_homedir (sam_pwent, homedir, PDB_CHANGED);
563 pdb_set_dir_drive (sam_pwent, drive, PDB_CHANGED);
565 pdb_set_logon_script(sam_pwent, script, PDB_CHANGED);
567 pdb_set_profile_path (sam_pwent, profile, PDB_CHANGED);
576 TALLOC_FREE(sam_pwent);
582 pdb_set_user_sid (sam_pwent, &u_sid, PDB_CHANGED);
585 pdb_set_acct_ctrl (sam_pwent, ACB_NORMAL, PDB_CHANGED);
587 if (NT_STATUS_IS_OK(in->add_sam_account (in, sam_pwent))) {
591 TALLOC_FREE(sam_pwent);
594 TALLOC_FREE(sam_pwent);
604 struct samu *sam_pwent=NULL;
632 if ( (sam_pwent = samu_new( NULL )) == NULL ) {
638 if ( !NT_STATUS_IS_OK(samu_alloc_rid_unix(sam_pwent, pwd )) ) {
646 pdb_set_plaintext_passwd (sam_pwent, machinename);
647 pdb_set_username (sam_pwent, machineaccount, PDB_CHANGED);
648 pdb_set_acct_ctrl (sam_pwent, ACB_WSTRUST, PDB_CHANGED);
650 if (NT_STATUS_IS_OK(in->add_sam_account (in, sam_pwent))) {
654 TALLOC_FREE(sam_pwent);
657 TALLOC_FREE(sam_pwent);