?
Solved

Rename Account

Posted on 1999-07-06
3
Medium Priority
?
283 Views
Last Modified: 2010-04-20
I have an account called pras on my linux m/c
Now i want to change my account name to prask
How do i change my account name from pras to prask so that no data is lost.
0
Comment
Question by:LotsOfQuestions
  • 2
3 Comments
 
LVL 10

Accepted Solution

by:
rbr earned 20 total points
ID: 1635081
You must be super-user to to this
edit in the /etc directory the file
passwd
shadow (if you have one)
and
group

0
 
LVL 10

Expert Comment

by:rbr
ID: 1635082
Or try usermod
man usermod

usermod -l prask pras

0
 
LVL 1

Expert Comment

by:diogoschneider
ID: 1635083
You gotta replace 'pras' by 'prask' on the following files (if you have them):

/etc/passwd
/etc/passwd-
/etc/shadow
/etc/shadow-
/etc/group

For this operation you can use 'vi', by typing:

vi /dir/file

And inside the file you can do the command:

:1,$s,pras,prask,g

This will assure every appearance of 'pras' on the file is changed to 'prask'. But if you just use your favourite text editor is ok.

And you'll also have to rename your mailbox on  /var/spool/mail:

cd /var/spool/mail
mv pras prask

Not to mention your home directory:

cd /home
mv pras prask

Note that the above instructions are for the standard Linux resources... If you have any other application you'll have to change them as well...

Good luck!

[]'s,

Diogo.
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Question has a verified solution.

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

Often times it's very very easy to extend a volume on a Linux instance in AWS, but impossible to shrink it. I wanted to contribute to the experts-exchange community a way of providing a procedure that works on an AWS instance. It can also be used on…
Welcome back to our beginners guide of the popular Unix tool, cron. If you missed part one where we introduced this tool, the link is below. We left off learning how to build a simple script to schedule automatic back ups. Now, we’ll learn how to se…
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month3 days, 21 hours left to enroll

601 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