LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-01-2012, 01:12 PM   #1
Vanek26
LQ Newbie
 
Registered: Apr 2012
Posts: 2

Rep: Reputation: Disabled
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.
 
Old 04-01-2012, 01:19 PM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
What is it about usermod's -l/--login option that you do not understand?
 
Old 04-01-2012, 01:36 PM   #3
Vanek26
LQ Newbie
 
Registered: Apr 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by catkin View Post
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?
 
Old 04-01-2012, 01:54 PM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,869

Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247
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/
 
Old 04-01-2012, 05:56 PM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
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
 
Old 04-01-2012, 06:59 PM   #6
jmc1987
Member
 
Registered: Sep 2009
Location: Oklahoma
Distribution: Debian, CentOS, windows 7
Posts: 872

Rep: Reputation: 112Reputation: 112
#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

Last edited by jmc1987; 04-01-2012 at 07:02 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Create user add file with default password and force user to change it? Morgandy Linux - Newbie 3 02-02-2010 06:06 PM
How do i change to super user then revert back to ordinary user ,using shell script? wrapster Solaris / OpenSolaris 6 03-18-2009 04:37 AM
samba(global security=user) useful tools for client.ex: user change password. hocheetiong Linux - Newbie 1 03-18-2008 10:20 AM
what is the command to make a user change their password after creating a new user? naweenio Linux - Newbie 7 01-05-2005 08:07 AM
How do I change the cursors globaly for a user? and how do I change them in the E-WM? enigma Z Linux - Software 1 09-18-2004 04:59 PM


All times are GMT -5. The time now is 12:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration