Lines Matching defs:pwd
214 SAM_ACCOUNT *pwd = NULL;
236 for (; (NT_STATUS_IS_OK(nt_status = pdb_init_sam_talloc(mem_ctx, &pwd)))
237 && pdb_getsampwent(pwd) == True; pwd=NULL) {
239 if (!((pdb_get_acct_ctrl(pwd) & ACB_WSTRUST)
240 || (pdb_get_acct_ctrl(pwd) & ACB_SVRTRUST))) {
241 DEBUG(5,("load_sampwd_entries: '%s' is not a machine account - ACB: %x - skipping\n", pdb_get_username(pwd), acb_mask));
242 pdb_free_sam(&pwd);
246 if (acb_mask != 0 && !(pdb_get_acct_ctrl(pwd) & acb_mask)) {
247 pdb_free_sam(&pwd);
267 info->disp_info.disp_user_info[info->disp_info.num_user_account]=*pwd;
697 SAM_ACCOUNT *pwd = NULL;
721 pwd = &disp_user_info[i+start_idx];
722 temp_name = pdb_get_username(pwd);
724 user_sid = pdb_get_user_sid(pwd);
2611 SAM_ACCOUNT *pwd =NULL;
2614 pdb_init_sam(&pwd);
2616 ret = pdb_getsampwsid(pwd, sid);
2619 pdb_free_sam(&pwd);
2625 pdb_free_sam(&pwd);
2630 if (!pdb_set_acct_ctrl(pwd, id10->acb_info, PDB_CHANGED)) {
2631 pdb_free_sam(&pwd);
2635 if(!pdb_update_sam_account(pwd)) {
2636 pdb_free_sam(&pwd);
2640 pdb_free_sam(&pwd);
2651 SAM_ACCOUNT *pwd = NULL;
2653 pdb_init_sam(&pwd);
2655 if(!pdb_getsampwsid(pwd, sid)) {
2656 pdb_free_sam(&pwd);
2662 pdb_free_sam(&pwd);
2666 if (!pdb_set_lanman_passwd (pwd, id12->lm_pwd, PDB_CHANGED)) {
2667 pdb_free_sam(&pwd);
2670 if (!pdb_set_nt_passwd (pwd, id12->nt_pwd, PDB_CHANGED)) {
2671 pdb_free_sam(&pwd);
2674 if (!pdb_set_pass_changed_now (pwd)) {
2675 pdb_free_sam(&pwd);
2678 if(!pdb_update_sam_account(pwd)) {
2679 pdb_free_sam(&pwd);
2683 pdb_free_sam(&pwd);
2729 SAM_ACCOUNT *pwd = NULL;
2736 pdb_init_sam(&pwd);
2738 if (!pdb_getsampwsid(pwd, sid)) {
2739 pdb_free_sam(&pwd);
2743 copy_id20_to_sam_passwd(pwd, id20);
2746 if(!pdb_update_sam_account(pwd)) {
2747 pdb_free_sam(&pwd);
2751 pdb_free_sam(&pwd);
2761 SAM_ACCOUNT *pwd = NULL;
2768 pdb_init_sam(&pwd);
2770 if (!pdb_getsampwsid(pwd, sid)) {
2771 pdb_free_sam(&pwd);
2775 copy_id21_to_sam_passwd(pwd, id21);
2779 * that pwd still has the password hashes from the
2784 if (IS_SAM_CHANGED(pwd, PDB_GROUPSID))
2785 set_unix_primary_group(pwd);
2788 if(!pdb_update_sam_account(pwd)) {
2789 pdb_free_sam(&pwd);
2793 pdb_free_sam(&pwd);
2804 SAM_ACCOUNT *pwd = NULL;
2814 pdb_init_sam(&pwd);
2816 if (!pdb_getsampwsid(pwd, sid)) {
2817 pdb_free_sam(&pwd);
2822 pdb_get_username(pwd)));
2824 acct_ctrl = pdb_get_acct_ctrl(pwd);
2827 pdb_free_sam(&pwd);
2831 if (!pdb_set_plaintext_passwd (pwd, plaintext_buf)) {
2832 pdb_free_sam(&pwd);
2836 copy_id23_to_sam_passwd(pwd, id23);
2846 if(!chgpasswd(pdb_get_username(pwd), "", plaintext_buf, True)) {
2847 pdb_free_sam(&pwd);
2854 if (IS_SAM_CHANGED(pwd, PDB_GROUPSID))
2855 set_unix_primary_group(pwd);
2857 if(!pdb_update_sam_account(pwd)) {
2858 pdb_free_sam(&pwd);
2862 pdb_free_sam(&pwd);
2873 SAM_ACCOUNT *pwd = NULL;
2878 pdb_init_sam(&pwd);
2880 if (!pdb_getsampwsid(pwd, sid)) {
2881 pdb_free_sam(&pwd);
2886 pdb_get_username(pwd)));
2888 acct_ctrl = pdb_get_acct_ctrl(pwd);
2893 pdb_free_sam(&pwd);
2897 if (!pdb_set_plaintext_passwd (pwd, plaintext_buf)) {
2898 pdb_free_sam(&pwd);
2910 if(!chgpasswd(pdb_get_username(pwd), "", plaintext_buf, True)) {
2911 pdb_free_sam(&pwd);
2922 if(!pdb_update_sam_account(pwd)) {
2923 pdb_free_sam(&pwd);
2927 pdb_free_sam(&pwd);
3337 struct passwd *pwd;
3391 if ((pwd=getpwuid_alloc(uid)) == NULL) {
3396 passwd_free(&pwd);
3404 if(user_in_unix_group_list(pwd->pw_name, grp_name)) {
3405 passwd_free(&pwd);
3413 smb_add_user_group(grp_name, pwd->pw_name);
3416 if(!user_in_unix_group_list(pwd->pw_name, grp_name)) {
3417 passwd_free(&pwd);
3421 passwd_free(&pwd);
3501 struct passwd *pwd;
3551 if ((pwd=getpwuid_alloc(uid)) == NULL) {
3556 passwd_free(&pwd);
3564 if(user_in_unix_group_list(pwd->pw_name, grp_name)) {
3565 passwd_free(&pwd);
3575 smb_add_user_group(grp_name, pwd->pw_name);
3578 if(!user_in_unix_group_list(pwd->pw_name, grp_name)) {
3579 passwd_free(&pwd);
3583 passwd_free(&pwd);