LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-11-2006, 08:36 AM   #1
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Rep: Reputation: 77
Question Edit/Add Basic User Info?


I noticed that some users on our RHEL servers are missing info when our previous admin entered them into the server. I would like to add their actual names but was unable to find a way to do so. I checked the "usermod" man page and did not find anything that was what I am looking for. Maybe someone can tell me what I am missing...

Code:
[root@lt2fs1 ~]# finger jsmith
Login: jsmith                        Name: (null)
Directory: /home/jsmith              Shell: /bin/bash
 
Old 09-11-2006, 08:43 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Take a look at usermod. It can modify a user account. Man usermod for all the details.

Oops...... You already did that. Doesn't the -c option do what you want?

Also take a look at chfn.

Hope this helps.

Last edited by druuna; 09-11-2006 at 08:45 AM.
 
Old 09-11-2006, 08:48 AM   #3
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Original Poster
Rep: Reputation: 77
I see the "-c" option but in the man page it is defined as:

Quote:
-c comment
The new value of the user’s password file comment field. It is
normally modified using the chfn(1) utility.
I did not get anything in regards to being able to modify basic user information like actual name and stuff like that.

So I figured I would try and see what happens and I get the following...

Code:
[root@lt2fs1 ~]# usermod -c cwilliams
usage: usermod  [-u uid [-o]] [-g group] [[-a] -G group,...]
                [-d home [-m]] [-s shell] [-c comment] [-l new_name]
                [-f inactive] [-e expire ] [-p passwd] [-L|-U] name

Last edited by carlosinfl; 09-11-2006 at 08:49 AM.
 
Old 09-11-2006, 08:55 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

As stated in the manpage: usermod -c "whatever you want" <user>
You did not provide a user.

You probably need to take a look at chfn.

Hope this helps.
 
Old 09-11-2006, 08:55 AM   #5
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
You are getting Those results because you are using the wrong syntax. You would do something like
Code:
#usermod -c "Carl Williams" cwilliams
-c is indeed classed as the comment field because its not just for a users name but any text string. Usually people use that switch for a users fullname, phone number, room number etc.

Last edited by reddazz; 09-12-2006 at 03:13 AM. Reason: typos
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
any books with basic info? sfzombie13 Linux - Newbie 5 08-06-2005 06:52 PM
Program to edit Meta-Info of jpg files phase9 Linux - Software 2 08-03-2004 01:42 AM
Need help finishing Bash Script to add new user and map virtual e-mail info. O_Chaos Linux - Newbie 1 02-09-2004 04:06 PM
Basic SuSE info KePSuX Linux - Distributions 8 03-23-2003 05:24 PM
I'm a BASIC chap, looking for some info on BASIC programming CragStar Programming 2 01-21-2001 09:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:46 AM.

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
Open Source Consulting | Domain Registration