LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 09: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, 10:30 AM   #2
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,298
Blog Entries: 61

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, 11:28 AM   #3
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
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, 01: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 03:48 AM.
 
Old 04-14-2008, 03: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 03:10 PM.
 
Old 04-14-2008, 08:32 PM   #6
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
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



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 01:36 AM
kamix defaults SCOSWriter Linux - Software 1 05-31-2005 02:26 PM
Defaults? aethiolas Linux - Newbie 2 12-21-2004 05:31 AM
Defaults Lostman Linux - Newbie 5 11-04-2003 05:31 PM
volume defaults bandofmercy Linux - General 1 04-19-2003 11:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:49 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
Open Source Consulting | Domain Registration