• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asus-wl-520gu-7.0.1.45/src/router/samba/source/passdb/

Lines Matching defs:user

34  Windows box will map the BOGUS\user to DOMAIN\user.  A 
35 standalone box will map to WKS\user.
66 void pdb_fill_default_sam(SAM_ACCOUNT *user)
68 ZERO_STRUCT(user->private); /* Don't touch the talloc context */
71 user->methods = NULL;
76 user->private.logon_time = (time_t)0;
77 user->private.pass_last_set_time = (time_t)0;
78 user->private.pass_can_change_time = (time_t)0;
79 user->private.logoff_time =
80 user->private.kickoff_time =
81 user->private.pass_must_change_time = get_time_t_max();
82 user->private.unknown_3 = 0x00ffffff; /* don't know */
83 user->private.logon_divs = 168; /* hours per week */
84 user->private.hours_len = 21; /* 21 times 8 bits = 168 */
85 memset(user->private.hours, 0xff, user->private.hours_len); /* available at all hours */
86 user->private.bad_password_count = 0;
87 user->private.logon_count = 0;
88 user->private.unknown_6 = 0x000004ec; /* don't know */
93 user->private.username = "";
94 user->private.domain = "";
95 user->private.nt_username = "";
96 user->private.full_name = "";
97 user->private.home_dir = "";
98 user->private.logon_script = "";
99 user->private.profile_path = "";
100 user->private.acct_desc = "";
101 user->private.workstations = "";
102 user->private.unknown_str = "";
103 user->private.munged_dial = "";
105 user->private.plaintext_pw = NULL;
109 value of 'normal user'. This helps User Manager, which
113 user->private.acct_ctrl = ACB_NORMAL;
116 static void destroy_pdb_talloc(SAM_ACCOUNT **user)
118 if (*user) {
119 data_blob_clear_free(&((*user)->private.lm_pw));
120 data_blob_clear_free(&((*user)->private.nt_pw));
122 if((*user)->private.plaintext_pw!=NULL)
123 memset((*user)->private.plaintext_pw,'\0',strlen((*user)->private.plaintext_pw));
124 talloc_destroy((*user)->mem_ctx);
125 *user = NULL;
134 NTSTATUS pdb_init_sam_talloc(TALLOC_CTX *mem_ctx, SAM_ACCOUNT **user)
136 if (*user != NULL) {
149 *user=(SAM_ACCOUNT *)talloc(mem_ctx, sizeof(SAM_ACCOUNT));
151 if (*user==NULL) {
156 (*user)->mem_ctx = mem_ctx;
158 (*user)->free_fn = NULL;
160 pdb_fill_default_sam(*user);
170 NTSTATUS pdb_init_sam(SAM_ACCOUNT **user)
182 if (!NT_STATUS_IS_OK(nt_status = pdb_init_sam_talloc(mem_ctx, user))) {
187 (*user)->free_fn = destroy_pdb_talloc;
218 in when added to the backend, because the user's SID
227 /* check if this is a user account or a machine account */
258 DEBUG(1, ("Failed to set 'normal account' flags for user %s.\n", pwd->pw_name));
263 DEBUG(1, ("Failed to set 'trusted workstation account' flags for user %s.\n", pwd->pw_name));
301 on the UNIX user. Pass in a RID if you have one
341 * @param user SAM_ACCOUNT to free members of.
344 static void pdb_free_sam_contents(SAM_ACCOUNT *user)
350 data_blob_clear_free(&(user->private.lm_pw));
351 data_blob_clear_free(&(user->private.nt_pw));
352 if (user->private.plaintext_pw!=NULL)
353 memset(user->private.plaintext_pw,'\0',strlen(user->private.plaintext_pw));
355 if (user->private.backend_private_data && user->private.backend_private_data_free_fn) {
356 user->private.backend_private_data_free_fn(&user->private.backend_private_data);
365 NTSTATUS pdb_reset_sam(SAM_ACCOUNT *user)
367 if (user == NULL) {
375 pdb_free_sam_contents(user);
377 pdb_fill_default_sam(user);
387 NTSTATUS pdb_free_sam(SAM_ACCOUNT **user)
389 if (*user == NULL) {
397 pdb_free_sam_contents(*user);
399 if ((*user)->free_fn) {
400 (*user)->free_fn(user);
408 * allocate and set the user SID, please do use this function to create new
528 case 'M': { acct_ctrl |= ACB_MNS ; break; /* 'M'NS logon user account. What is this ? */ }
620 Converts NT user RID to a UNIX uid.
676 Decides if a RID is a user or group RID.
682 * such that it can be identified as either a user, group etc
690 * The only well known user RIDs are DOMAIN_USER_RID_ADMIN
738 /* see if the passdb can help us with the name of the user */
773 DEBUG(5, ("assuming RID %u is a user\n", (unsigned)rid));
786 DEBUG(5,("local_lookup_sid: found user %s for rid %u\n", name,
830 fstring user;
838 * user may be quoted a const string, and map_username and
842 fstrcpy(user, c_user);
850 if(strequal(user, "Everyone")) {
857 (void)map_username(user);
866 if (pdb_getsampwnam(sam_account, user)) {
882 if (pdb_getgrnam(&map, user)) {
888 grp = sys_getgrnam(user);
937 /* Get the smb passwd entry for this user */
948 slprintf(err_str, err_str_len-1, "Failed to initialise SAM_ACCOUNT for user %s.\n", user_name);
952 slprintf(err_str, err_str_len-1,"Failed to find entry for user %s.\n", user_name);
965 slprintf(err_str, err_str_len - 1, "Failed to set 'trusted workstation account' flags for user %s.\n", user_name);
971 slprintf(err_str, err_str_len - 1, "Failed to set 'domain trust account' flags for user %s.\n", user_name);
977 slprintf(err_str, err_str_len - 1, "Failed to set 'normal account' flags for user %s.\n", user_name);
990 slprintf(err_str, err_str_len-1, "Failed to set 'disabled' flag for user %s.\n", user_name);
996 slprintf(err_str, err_str_len-1, "Failed to unset 'disabled' flag for user %s.\n", user_name);
1004 slprintf(err_str, err_str_len-1, "Failed to set 'no password required' flag for user %s.\n", user_name);
1010 * If we're dealing with setting a completely empty user account
1014 * We remove that as we're giving this user their first password
1020 slprintf(err_str, err_str_len-1, "Failed to unset 'disabled' flag for user %s.\n", user_name);
1026 slprintf(err_str, err_str_len-1, "Failed to unset 'no password required' flag for user %s.\n", user_name);
1032 slprintf(err_str, err_str_len-1, "Failed to set password for user %s.\n", user_name);
1040 slprintf(msg_str, msg_str_len-1, "Added user %s.\n", user_name);
1044 slprintf(err_str, err_str_len-1, "Failed to add entry for user %s.\n", user_name);
1050 slprintf(err_str,err_str_len-1, "Failed to delete entry for user %s.\n", user_name);
1054 slprintf(msg_str, msg_str_len-1, "Deleted user %s.\n", user_name);
1057 slprintf(err_str, err_str_len-1, "Failed to modify entry for user %s.\n", user_name);
1062 slprintf(msg_str, msg_str_len-1, "Disabled user %s.\n", user_name);
1064 slprintf(msg_str, msg_str_len-1, "Enabled user %s.\n", user_name);
1153 /* lookup the user account */