1820637 Members
1777 Online
109626 Solutions
New Discussion юеВ

Login name

 
nandam
Frequent Advisor

Login name

Hi,
can you please tell me how to modify user name only
Eg, login name is Roy but it should be roy

thanks
9 REPLIES 9
Robert-Jan Goossens_1
Honored Contributor

Re: Login name

Hi,

# cp /etc/passwd /etc/passwd.11092006
# vi /etc/passwd
change Roy to roy
:wq!

Robert-Jan
Patrick Wallek
Honored Contributor

Re: Login name

You can also use the usermod command.

# usermod -l roy Roy

# man usermod

for details.

Note that usermod cannot be used if the user is currently logged in to the system.
James R. Ferguson
Acclaimed Contributor

Re: Login name

Hi:

Use 'usermod -l'. See:

http://docs.hp.com/en/B2355-60127/usermod.1M.html

Regards!

...JRF...
Jeff_Traigle
Honored Contributor

Re: Login name

Or without manually manipulating the passwd file:

usermod -l roy Roy

If you edit it manually and it's a Trusted system, you may also need to manually move the /tcb/files/auth/R/Roy file to /tcb/files/auth/r/roy and edit Roy to roy inside it. Never tried this... a lot cleaner to use the commands designed to perform the functions than hack on things with questionable results. ;)
--
Jeff Traigle
Pupil_1
Trusted Contributor

Re: Login name

usermod
is the command to change the username.
this can also be doing with 'vi' ing the /etc/passwd and changing the username from 'Roy' to 'roy'
There is always something new to learn everyday !!
Fabian Brise├▒o
Esteemed Contributor

Re: Login name

or you can take the easy road and use SAM to do this task :D
Knowledge is power.
Sp4admin
Trusted Contributor

Re: Login name

Hi nandam,
you can use the "usermod -l (username) command. Or you can "vi the /etc/passwd file but make sure you make a copy before. You can also use "SAM".

sp,
nandam
Frequent Advisor

Re: Login name

Hi thanks for all

i got more info from you

thank you very much
spex
Honored Contributor

Re: Login name

Hi,

'vipw' is the preferred method for editing '/etc/passwd'.

PCS