Solved

Change Username with Usermod utility

Posted on 2001-07-16
4
2,794 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

Independent Software Vendors: 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

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
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…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

729 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