[Samba] Restore a user?
jpyeron at pdinc.us
Sun Jul 8 14:29:07 UTC 2018
[As a separate thread, I am going to do post mortem of how I got here - and what not to do. I have a locked computer logged in as this user - need to unlock and access unsaved content.]
I either need to resore the user or create a new user of the same name and sid.
I am using Version 4.8.2 - commit e64d0d03351ce8fbc1f929fa86dcfd8d56183f35 .
Names have been changed to protect the guilty.
# ldbrename -e nano -H /usr/local/samba/private/sam.ldb 'CN=username\0ADEL:efefde21-48da-4fb0-b47c-9eafcefc45fe,CN=Deleted Objects,DC=domain' CN=username,CN=Users,DC=domain
rename of 'CN=username\0ADEL:efefde21-48da-4fb0-b47c-9eafcefc45fe,CN=Deleted Objects,DC=domain' to 'CN=username,CN=Users,DC=domain' failed - ldb_wait from ldb_rename with LDB_WAIT_ALL: No such object (32)
Reading https://bugzilla.samba.org/show_bug.cgi?id=10371 says this is due to "where restoring an object would cause a duplicate DN". I have checked within my limits, there are not duplicate target DNs.
Selected attributes from the record are:
dn: CN=username\0ADEL:efefde21-48da-4fb0-b47c-9eafcefc45fe,CN=Deleted Objects,DC=domain
Am I having issues because of isRecycled ? - https://bugzilla.samba.org/show_bug.cgi?id=10371 says: "Recycle bin is not a supported feature right now" and "After reading this, I provisioned a new domain _and did not enable the recycle bin_. In this case the ldbmodify works like you described it in the Wiki. It would be great if you could get it working with recycle bin enabled too."
Things I read which do not seem to get me very far:
- Jason Pyeron PD Inc. http://www.pdinc.us -
- Principal Consultant 10 West 24th Street #100 -
- +1 (443) 269-1555 x333 Baltimore, Maryland 21218 -
More information about the samba