Solved

Change Username with Usermod utility

Posted on 2001-07-16
4
2,795 Views
Last Modified: 2010-08-05
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.  
0
Comment
Question by:zipdog44
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 1

Expert Comment

by:kawin
ID: 6288205
User can't change login name!!!!  It restrict by OS.

Only "root" can change username.
0
 
LVL 3

Expert Comment

by:tdaoud
ID: 6288314
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
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 50 total points
ID: 6290310
su root -c "usermod -l whitman"
0
 
LVL 6

Expert Comment

by:bira
ID: 6290354
Log on as whitmanb and run this

  passwd


          It will prompt for the old password, then
          for the new password, twice.
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question