LinuxQuestions.org
Visit Jeremy's Blog.
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-14-2008, 10:48 AM   #1
pretruder
LQ Newbie
 
Registered: Apr 2008
Posts: 8

Rep: Reputation: 0
useradd defaults


How do I make the defaults set a new user to the /home directory?
When i add a user now it places the user at / at login, but i want it to create a directory in /home and place them there at log in...
I have successfully installed a windows-slackware dualboot, and so far I havn't had any problems.I even got my linux connected to the internet with success.However, I am a brandnew linux user, so I don't really know that much but learn fast. A friend referred me to this forum with great recomendation. I'm brand new so please be patient. I'm sure I'll be back with many questions :P
 
Old 04-14-2008, 11:30 AM   #2
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.1
Posts: 7,453
Blog Entries: 55

Rep: Reputation: Disabled
I use adduser instead of useradd: adduser name, then it asks a few questions - such as: /home/name -most of which it's OK to accept the defaults.
 
Old 04-14-2008, 12:28 PM   #3
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,549
Blog Entries: 23

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
Hi,

Welcome to LQ & Slackware!

As stated you should use the 'adduser' to create new accounts. Be sure to add the new user to the necessary groups;

Code:
floppy audio video cdrom plugdev
12.0 and HAL - READ THIS! is a thread you should read.
 
Old 04-14-2008, 02:29 PM   #4
prad77
Member
 
Registered: Mar 2008
Posts: 101

Rep: Reputation: 15
Specifying options accordingly will create the required home dir .Take care of -b, -d , -m options while defining home dirs.

-b, --base-dir BASE_DIR
The default base directory for the system if -d dir is not specified. BASE_DIR is concatenated with the account name to define the home directory. If the -m option is not used, BASE_DIR must exist.
-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.

useradd -d /home/james jim

Gentoo

Last edited by prad77; 04-17-2008 at 04:48 AM.
 
Old 04-14-2008, 04:08 PM   #5
pretruder
LQ Newbie
 
Registered: Apr 2008
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks alot guys, I got it! Also, thankyou for the warm welcome.
I have been waiting so long for this installation lol.
I was on dial-up and just recently got cable and was finally able to download it and install it. I'm proud to say my first dual boot installation went very well (although slackware has done a remarkable job of making it easy in my opinion)
Linux 4 life!

PS-Thanx 4 the links onebuck. They were very helpful.

Last edited by pretruder; 04-14-2008 at 04:10 PM.
 
Old 04-14-2008, 09:32 PM   #6
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,125

Rep: Reputation: 164Reputation: 164
If you do use useradd at some point (in scripts, etc.) you can put default settings in /etc/default/useradd so that you can keep the command line simple.
 
  


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
Useradd - Cannot locate /etc/default/useradd in Solaris Paean Solaris / OpenSolaris 4 12-09-2005 02:36 AM
kamix defaults SCOSWriter Linux - Software 1 05-31-2005 03:26 PM
Defaults? aethiolas Linux - Newbie 2 12-21-2004 06:31 AM
Defaults Lostman Linux - Newbie 5 11-04-2003 06:31 PM
volume defaults bandofmercy Linux - General 1 04-20-2003 12:16 AM


All times are GMT -5. The time now is 04:56 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