h1

Rename a username , groupname and its homedirectory with usermod

August 5, 2008

Rename user 7777777 ‘s name, groupname and homedir to 88888888 with usermod

root@server1 [/home]# useradd 7777777
root@server1 [/home]#
root@server1 [/home]# grep 7777777 /etc/passwd
7777777:x:32147:32148::/home/

7777777:/bin/bash
root@server1 [/home]#
root@server1 [/home]# grep 7777777 /etc/group
7777777:x:32148:
root@server1 [/home]#
root@server1 [/home]# usermod -d /home/88888888 7777777
root@server1 [/home]#
root@server1 [/home]# grep 7777777 /etc/passwd
7777777:x:32147:32148::/home/88888888:/bin/bash
root@server1 [/home]#

************************************************************************************************************
root@server1 [/home]# rm -fr /home/7777777/        OR  you can mv /home/7777777 /home/88888888, if you want
************************************************************************************************************

root@server1 [/home]# usermod -l 88888888 7777777
failed to rename mailbox: File exists
root@server1 [/home]#

root@server1 [/home]# grep 7777777 /etc/passwd

root@server1 [/home]# grep 88888888 /etc/passwd
88888888:x:32147:32148::/home/88888888:/bin/bash
root@server1 [/home]#

root@server1 [/home]# groupmod -n 88888888 7777777
root@server1 [/home]#

root@server1 [/home]# grep 7777777 /etc/group

root@server1 [/home]#
root@server1 [/home]# grep 88888888 /etc/group
88888888:x:32148:
root@server1 [/home]#

Advertisements

2 comments

  1. As anedotas pá, isso é que a gente gosta, o seu credito para mim agora é so anedotas, contador de anedotas po­isD:ficÃilimo acto é o de escrever, responsabilidade das maiores. Basta pensar no extenuante trabalho que será dispor por ordem temporal os acontecimentos, primeiro este, depois aquele, ou, se tal mais convém às necessidades do efeito, o sucesso de hoje posto antes do episódio de ontem, e outras não menos arriscadas acrobacias.


  2. Hi Emily! I found my lovely little gems at the Marin Farmers market here in northern california. Where are you located? I have also seen them at local gourmet markets like Bi-rite or the San Francisco Ferry Building Farmers market. I am also pretty sure that there must be suppliers in southern california as well.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: