Displaying 5 results from an estimated 5 matches for "pdb_get_username".
2006 Jan 05
1
Cannot log in to domain
...fo_sam() failed with
'NT_STATUS_NO_SUCH_USER'
This is basically telling me that Samba can't see the user in the
passwd file. But it works for Local windows users though, which is
just bizarre.
This is the C code in auth_util.c that is causing the problem:
if ( !(pwd = getpwnam_alloc(pdb_get_username(sampass))) ) {
DEBUG(1, ("User %s in passdb, but getpwnam() fails!\n",
pdb_get_username(sampass)));
free_server_info(server_info);
return NT_STATUS_NO_SUCH_USER;
I can only assume that for some reason, this particular C function is
trying to run getpwnam() and an error is bei...
2005 Mar 17
0
usrmgr.exe and problems
...user exists before trying to remove it from the group */
pdb_init_sam(&sam_pass);
- if (!pdb_getsampwsid(sam_pass, &user_sid)) {
+
+ become_root();
+ ret = pdb_getsampwsid(sam_pass, &user_sid);
+ unbecome_root();
+
+ if (!ret) {
DEBUG(5,("User %s doesn't exist.\n", pdb_get_username(sam_pass)));
pdb_free_sam(&sam_pass);
return NT_STATUS_NO_SUCH_USER;
@@ -4253,6 +4267,7 @@
GROUP_MAP map;
GROUP_INFO_CTR *ctr;
uint32 acc_granted;
+ BOOL ret;
if (!get_lsa_policy_samr_sid(p, &q_u->pol, &group_sid, &acc_granted))
return NT_STATUS_INVALID_HANDLE;...
2004 Mar 15
0
join domain without root
...}
+ }
+
+ if (do_become_root) become_root();
+ ret = pdb_getsampwrid(pwd, rid);
+ if (do_become_root) unbecome_root();
+ if (ret != True) {
pdb_free_sam(pwd);
return False;
}
acct_ctrl = pdb_get_acct_ctrl(pwd);
+ if (do_become_root) {
+ char *username, *hostname, *s;
+ username = pdb_get_username(pwd);
+ DEBUG(0, ("set_user_info_pw: EUID %d for %s, with become_root\n", geteuid(), username));
+ if ( !(acct_ctrl & ACB_WSTRUST) ) {
+ DEBUG(0, ("set_user_info_pw: Not a machine account\n"));
+ pdb_free_sam(pwd);
+ return False;
+ }
+ hostname = client_name();
+...
2004 Jan 30
0
[PATCH] Group mapping primary group SID update
...b_setsampwent(True)) {
+ DEBUG(0,("update_users_primgroup_sid: Cannot open password
database.\n"));
+ return False;
+ }
+
+ while (NT_STATUS_IS_OK(pdb_init_sam(&sam_pwent)) &&
pdb_getsampwent(sam_pwent)) {
+ fstrcpy(usrname,pdb_get_username(sam_pwent));
+ if(!(pass = Get_Pwnam(usrname))) {
+ DEBUG(0,("update_users_primgroup_sid: Cannot find Unix
account for %s.\n", usrname));
+ return False;
+ }
+
+ if ((pass->pw_gid) != (gid_t)-1) {
+...
2005 May 11
1
SV: Error with usrmgr and groups.
It's exactly the same. Except that I use tdbsam instead of ldap and the error message therefore also is different in the log file. But the example and result is the same. Do you have any idea of workaround or fix?
Cheers,
Joel
-----Ursprungligt meddelande-----
Fr?n: Doug Campbell [mailto:doug@bpta.net]
Skickat: den 11 maj 2005 10:49
Till: Joel Larsson, PF, Posten; samba@lists.samba.org