zipdog44
asked on
Change Username with Usermod utility
Have a user account with username
whitmanb
want to change the username on his
account to
whitman
no "B"
Using solaris 7.X
how on the command line using the usermod
utility would u do this
without creating a new account
thanks in advance.
whitmanb
want to change the username on his
account to
whitman
no "B"
Using solaris 7.X
how on the command line using the usermod
utility would u do this
without creating a new account
thanks in advance.
As kawin said...if you intend to let users change their names, then you can't, only root can do that.
IF yo uare asking how to do it, then I don't think you can do it easily through a command line (I'm not sure if usermod has options to do that), but all you need to do is change it in the /etc/passwd file. You can write a small script if you want to use it from the command line, but it is better to edit the /etc/passwd file in the usual and appropriate ways "vipw". Otherwise you may need to rebuild some database files after changing usernames through a script file.
Good Luck,
Tarik
IF yo uare asking how to do it, then I don't think you can do it easily through a command line (I'm not sure if usermod has options to do that), but all you need to do is change it in the /etc/passwd file. You can write a small script if you want to use it from the command line, but it is better to edit the /etc/passwd file in the usual and appropriate ways "vipw". Otherwise you may need to rebuild some database files after changing usernames through a script file.
Good Luck,
Tarik
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Log on as whitmanb and run this
passwd
It will prompt for the old password, then
for the new password, twice.
passwd
It will prompt for the old password, then
for the new password, twice.
Only "root" can change username.