LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Trying to change the name of a user. (https://www.linuxquestions.org/questions/linux-newbie-8/trying-to-change-the-name-of-a-user-937561/)

Vanek26 04-01-2012 12:12 PM

Trying to change the name of a user.
 
Hello,
I am very new to linux, so bare with me here.

I am doing an assignment for a college class (Linux), one of the questions is to change the name of a user to something else.

I know that I have to be the root user, and that it is something to do with usermod -l (I think).
I've been stuck on this question for about an hour, so any help would be appreciated.

I am using Fedora 12 if that helps.

catkin 04-01-2012 12:19 PM

What is it about usermod's -l/--login option that you do not understand?

Vanek26 04-01-2012 12:36 PM

Quote:

Originally Posted by catkin (Post 4642085)
What is it about usermod's -l/--login option that you do not understand?

I don't understand how to change my account name from one thing to another.
For example if I wanted to change my account name from "luke" to "darth" What would the command look like?

yancek 04-01-2012 12:54 PM

Google Linux change username and you get countless sites with examples as the one below:

http://www.cyberciti.biz/faq/howto-c...-user-name-id/

TobiSGD 04-01-2012 04:56 PM

If you need more information about a command you can always have a look at the respective man-page, in your case the command would be
Code:

man usermod

jmc1987 04-01-2012 05:59 PM

#usermod -l <newlogin> <oldlogin>

Ex: # usermod -l james john

Where john is the old login and james is the new login id.

Code:

$ man usermod

USERMOD(8)                System Management Commands                USERMOD(8)

NAME
      usermod - modify a user account

SYNOPSIS
      usermod [options] LOGIN

DESCRIPTION
      The usermod command modifies the system account files to reflect the
      changes that are specified on the command line.

OPTIONS
      The options which apply to the usermod command are:

-l, --login NEW_LOGIN
          The name of the user will be changed from LOGIN to NEW_LOGIN.
          Nothing else is changed. In particular, the user's home directory
          name should probably be changed manually to reflect the new login
          name.

There is more to "$ man usermod" I just posted a bit of relivent info.

Hope that gives you an idea


All times are GMT -5. The time now is 07:39 AM.