Computing.Net > Forums > Linux > useradd question

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

useradd question

Reply to Message Icon

Name: shuck13000
Date: January 18, 2006 at 06:28:26 Pacific
OS: Win XP Pro
CPU/Ram: XP 3000 + 512MB
Comment:

Hi,
I'm a newbie to Linux so please be nice. :) I'm studying for the Network+ and am currently learning about installing Linux on a server. Anyway, when it comes to adding a new user, the book gives the example of:

useradd -m -g users -G teachers thomas

Well, I understand all of it except the book doesn't say anything about the -m switch and I was just wondering why it's there? Many thanks!



Sponsored Link
Ads by Google

Response Number 1
Name: Jake2
Date: January 18, 2006 at 07:18:36 Pacific
Reply:

From the useradd man page ("man useradd"):

-m, --create-home

The user's home directory will be created if it does not exist. The files contained in SKEL_DIR will be copied to the home directory if the -k option is used, otherwise the files contained in /etc/skel will be used instead. Any directories contained in SKEL_DIR or /etc/skel will be created in the user's home directory as well. The -k option is only valid in conjunction with the -m option. The default is to not create the directory and to not copy any files.


0

Response Number 2
Name: shaneP
Date: January 18, 2006 at 07:21:33 Pacific
Reply:

man useradd to find out all the options:
-m The user's home directory will be created if it does not exist. The files contained in skeleton_dir will be copied to the home directory if the -k option is used, otherwise the files contained in /etc/skel will be used instead. Any directories contained in skeleton_dir or /etc/skel will be created in the user's home directory as well. The -k option is only valid in conjunction with the -m option. The default is to not create the directory and to not copy any files.


0

Response Number 3
Name: shuck13000
Date: January 18, 2006 at 08:00:06 Pacific
Reply:

Cheers guys!


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


linux - broadcom wlan - h... Scroll wheel won't work



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: useradd question

question about IPchains firewall www.computing.net/answers/linux/question-about-ipchains-firewall/20268.html

another internet question, www.computing.net/answers/linux/another-internet-question/26460.html

linux networking questions www.computing.net/answers/linux/linux-networking-questions/6222.html