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

  1. add uid:$NEW
  2. remove uid:$OLD
  3. update homeDirectory, replace /home/$OLD with /home/$NEW
  4. update cn:
  5. update gecos:
  6. update sn:
  7. add gentooAlias: $OLD

dev.g.o changes

  1. set up mail alias

cat >/var/spool/mail/alias/users/$OLD <<EOF

  1. bug .... $DATE

$NEW EOF

  1. race condition here, do it fast in case mail arrives between mv & ln

mv /home/$OLD /home/$NEW && ln -s /home/$NEW /home/$OLD

  1. 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

  1. on https://bugs.gentoo.org/editusers.cgi
  2. find old login name
  3. update to new login name
  4. update real name if needed

Special groups

(rare)

  1. goto https://bugs.gentoo.org/editgroups.cgi
  2. find any group grants using regex and update the regex