LinuxQuestions.org
Register a domain and help support LQ
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 03-09-2011, 12:47 AM   #1
fossilet
Member
 
Registered: Jul 2004
Location: Beijing, China
Distribution: Ubuntu, Fedora, CentOS
Posts: 33

Rep: Reputation: 0
useradd question


I encountered a question in the Redhat Skills Assessment regarding useradd:

Which of the following CANNOT be defined when you create a user account with useradd?

a* A password expiration date.
b* The user's primary group.
c* The user's default shell.
d* The user's NIS or LDAP group.
e* The user's home directory.

Which is the corret answer? I have my own thinking which will be explained later.
 
Old 03-09-2011, 12:53 AM   #2
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 307Reputation: 307Reputation: 307Reputation: 307
D. The user's NIS or LDAP group.

Code:
-e, --expiredate EXPIRE_DATE 
The date on which the user account will be disabled. The date is specified in the format YYYY-MM-DD. 

-g, --gid GROUP 
The group name or number of the user's initial login group. The group name must exist. A group number must refer to an already existing group. /etc/default/useradd.

-s, --shell SHELL 
The name of the user's login shell. The default is to leave this field blank, which causes the system to select the default login shell. 

-d, --home HOME_DIR 
The new user will be created using HOME_DIR as the value for the user's login directory. The default is to append the LOGIN name to BASE_DIR and use that as the login directory name. The directory HOME_DIR does not have to exist but will not be created if it is missing.
 
Old 03-09-2011, 01:17 AM   #3
fossilet
Member
 
Registered: Jul 2004
Location: Beijing, China
Distribution: Ubuntu, Fedora, CentOS
Posts: 33

Original Poster
Rep: Reputation: 0
In the useradd man page, -e DATE specifies the date on which the account will be expired, not the password expiration date. The password expiration date can be changed via -M option of chage command. In some man page (I forget which), it says account expiration is different from password expiration.

Should I say, a) and d) are both the correct answer?
 
  


Reply

Tags
useradd


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
useradd and multiple group question bar338 Linux - Newbie 3 11-23-2009 10:05 AM
useradd - question about --non-unique option cygnus-x1 Linux - General 2 02-27-2008 10:57 AM
question about useradd hongxing Linux - Software 4 11-14-2005 07:00 AM
useradd from command line question Strixy Linux - Newbie 4 08-05-2005 06:58 PM
useradd command question hct224 Linux - Newbie 2 06-14-2004 04:47 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration