Bug 2861 - Unable to rename user accounts with usermanager
Summary: Unable to rename user accounts with usermanager
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: User/Group Accounts (show other bugs)
Version: 3.0.13
Hardware: All Windows XP
: P3 normal
Target Milestone: none
Assignee: Jim McDonough
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-07 08:51 UTC by Bill Marshall
Modified: 2005-10-20 13:57 UTC (History)
0 users

See Also:


Attachments
Add rename support to tdbsam (16.31 KB, patch)
2005-10-10 12:22 UTC, Jim McDonough
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bill Marshall 2005-07-07 08:51:48 UTC
There are a few problems related to renaming users when using a Samba domain
controller.

1) When using usrmgr to rename a user (user menu, rename), you get "The
Parameter is incorrect" as an error.

The call is samrsetinformationUser level 7 and the response is
status_invalid_info_class.

2) There probably should be a smb.conf parm to point at Idealx's smbldap-usermod
which will do the rename for you once the RPC works

Since usgmgr failed, I used smbldap-usermod to rename the account from the Samba DC
3) It looks like the name to sid mapping was stuck on an additional server, so
getent password retuend bogus info. I used tdbtool against netsamlogon_cache.tdb
remove the SID and restart winbind.

ex: 
# getent passwd  newuser
olduser:x:8147:1001:Last, First.:/home/olduser:/bin/false
Comment 1 Jeremy Allison 2005-07-20 17:44:54 UTC
We're missing many of the info levels on this pipe. I'll look at adding them in
(we have the IDL in Samba4 so shouldn't be too hard). It won't be for 3.0.20 but
for a release after that.
Jeremy.
Comment 2 Gerald (Jerry) Carter (dead mail address) 2005-08-29 14:35:12 UTC
known issue.  Is on the TODO list.
Comment 3 Gerald (Jerry) Carter (dead mail address) 2005-09-01 12:38:31 UTC
jmcd wants these.  So here you go.
Comment 4 Gerald (Jerry) Carter (dead mail address) 2005-09-01 12:39:01 UTC
reopen
Comment 5 Jim McDonough 2005-10-10 12:22:39 UTC
Created attachment 1496 [details]
Add rename support to tdbsam

patch adds the new SAM_ACCOUNT record, locks it, calls the posix add user
script, rewrites the RID record to point to the new account, unlocks the
record, then deletes the old account.
Comment 6 Jim McDonough 2005-10-11 13:18:50 UTC
committed patch for tdbsam, but now looking at adding tdb transaction support to
samba 3
Comment 7 Jim McDonough 2005-10-20 13:57:56 UTC
code has been checked in for the 3 supported backends, smbpasswd, tdbsam, and
ldapsam.