User:Robbat2/renaming a dev dump
From Gentoo Wiki
Jump to:navigation
Jump to:search
Quick dump on commands in renaming a developer.
LDAP changes first
LDAPVI="ldapvi -Z --tls strict -D uid=$INFRAUSER,ou=devs,dc=gentoo,dc=org"
$LDAPVI --rename uid=$OLD,ou=devs,dc=gentoo,dc=org uid=$NEW,ou=devs,dc=gentoo,dc=org
$LDAPVI uid=$NEW
- add uid:$NEW
- remove uid:$OLD
- update homeDirectory, replace /home/$OLD with /home/$NEW
- update cn:
- update gecos:
- update sn:
- add gentooAlias: $OLD
dev.g.o changes
- set up mail alias
cat >/var/spool/mail/alias/users/$OLD <<EOF
- bug .... $DATE
$NEW
EOF
- race condition here, do it fast in case mail arrives between mv & ln
mv /home/$OLD /home/$NEW && ln -s /home/$NEW /home/$OLD
- force nsscache update
time /usr/local/bin/pidlock $NSSCACHE update --full
/etc/init.d/nscd restart
getent $NEW # should return correct homedir & names
getent $OLD # should return NOTHING
bugs.g.o
User
- on https://bugs.gentoo.org/editusers.cgi
- find old login name
- update to new login name
- update real name if needed
Special groups
(rare)
- goto https://bugs.gentoo.org/editgroups.cgi
- find any group grants using regex and update the regex