danielhilst

Changing the name of a user on linux

May 8th, 2012
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. Changing the name of a user on linux
  2.  
  3. In this example, jjoplin becomes hilst
  4. # cd /etc
  5. # grep jjoplin * | cut -f1 -d: | while read f; do sed -e "s/jjoplin/hilst/g" -i $f; done
  6. # cd /home
  7. # mv jjoplin hilst
  8. # su - hilst
Advertisement
Add Comment
Please, Sign In to add comment