Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Change Username with Usermod utility

Posted on 2001-07-16
4
Medium Priority
?
2,804 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
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 200 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
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…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses
Course of the Month12 days, 13 hours left to enroll

972 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