Den Benutzernamen auf einem Linux-Server zu ändern ist einfach. Danach tut aber die Authentifizierung über Samba nicht mehr (es sei denn, man hat da Synchronisierung eingerichtet).
So kann man den Benutzernamen auch in Samba ändern:
a) The users' name in the passdb.tdb file
b) The users' login name and GECOS information in /etc/passwd and in
/etc/shadow, and all group membership information in /etc/groups
c) The name of the user's home directory
d) The name of the user's desktop profile directory on all MS Windows machine the user makes use of.
Ich hab nur die /var/lib/samba/passdb.tdb und das home directory geändert, da durch die Änderung des Usernamens /etc/passwd und /etc/group ja schon aktualisiert war...
Die passdb.tdb kann man nicht direkt editieren, nur indirekt:
a) pdbedit -i tdbsam -e smbpasswd
b) pdbedit -x user_name
c) Edit the smbpasswd file (it is a text file)
d) pdbedit -i smbpasswd -e tdbsam
Anmerkung: die smbpasswd wird als /etc/samba/smbpasswd erstellt
Quelle: http://samba.2283325.n4.nabble.com/Change-samba-username-with-tdbsam-backend-td2456580.html
Kategorie(n): Debian, Linux