LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 12-08-2009, 04:42 AM   #1
Citijay
LQ Newbie
 
Registered: Dec 2009
Posts: 2

Rep: Reputation: 0
how to rectify this problem - creating user without /home


Hi,

Admin is not my main job but I have to administer a computing servers for the students in my lab. I am in the middle of a linux course so I am still learning.

Right now I have encounter this problem whereby I have created a user using the command adduser and also the passwd. But after creating the user account, the /home is not created. How do I rectify this problem?

Many thanks for the kind help
 
Old 12-08-2009, 04:47 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
Hi,

You need to provide the -m and -d /home/username options.

I.e:

adduser -c "Comment goes here" -m -d /home/userX -s /bin/bash userX

If this user needs to belong to a specific group add: -g groupname
If this user needs to have a specific uid add: -u uid

Also: Have a look at the adduser/useradd manpage.

Hope this helps.
 
Old 12-08-2009, 04:57 AM   #3
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hello and welcome to LinuxQuestions,

Are you sure you used the adduser command? If I'm not mistaking this command creates the user directory /home/<username>. Maybe you've used the useradd instead which does not create it by default.

Kind regards,

Eric
 
Old 12-08-2009, 08:23 AM   #4
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,604
Blog Entries: 25

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
Hi,

Welcome to LQ!

Quote:
Originally Posted by Citijay View Post
Hi,

Admin is not my main job but I have to administer a computing servers for the students in my lab. I am in the middle of a linux course so I am still learning.

Right now I have encounter this problem whereby I have created a user using the command adduser and also the passwd. But after creating the user account, the /home is not created. How do I rectify this problem?

Many thanks for the kind help
Others have answered about your creation of accounts issues but look at the 'RUTE' in the below links to aid you in the future.

I would suggest that you look at some of the other links;

Linux Documentation Project
Rute Tutorial & Exposition
Linux Command Guide
Utimate Linux Newbie Guide
LinuxSelfHelp
Getting Started with Linux
Advanced Bash-Scripting Guide

These links and others can be found at 'Slackware-Links'. More than just SlackwareŽ links!

 
Old 12-08-2009, 08:51 PM   #5
Citijay
LQ Newbie
 
Registered: Dec 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by EricTRA View Post
Hello and welcome to LinuxQuestions,

Are you sure you used the adduser command? If I'm not mistaking this command creates the user directory /home/<username>. Maybe you've used the useradd instead which does not create it by default.

Kind regards,

Eric
Thanks for the help.
I did some experimenting since I have root access.
I used both 'useradd' and 'adduser' command to create a new account and when I check /etc/passwd, it show that the default is /export/home/user not /home/user. Question is where to find the default for creating the home directory?

And when I used to newly created user to login, the ssh script ran but it could not chdir to /home/user/.ncbirc saying that 'no such file or directory'. The next line said that 'mkdir: cannot create directory /home/user and saying 'no such directory'.

Then there is this error message: ERROR: Unknown switch ''. Accepted values: ia32, intel64, ia64. So could this be the problem, the switch configuration? Co-incindentally we just got a new Dell managed switch as the old one just conked tripping the whole rack.

Any help and inputs are much appreciated
 
Old 12-08-2009, 08:59 PM   #6
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Quote:
Originally Posted by Citijay View Post
I did some experimenting since I have root access.
I used both 'useradd' and 'adduser' command to create a new account and when I check /etc/passwd, it show that the default is /export/home/user not /home/user. Question is where to find the default for creating the home directory?
The adduser man page indicates that the defaults are set it /etc/adduser.conf

Quote:
And when I used to newly created user to login, the ssh script ran but it could not chdir to /home/user/.ncbirc saying that 'no such file or directory'. The next line said that 'mkdir: cannot create directory /home/user and saying 'no such directory'.
What "ssh script"? And why did it run? How did you login?

Quote:
Then there is this error message: ERROR: Unknown switch ''. Accepted values: ia32, intel64, ia64. So could this be the problem, the switch configuration? Co-incindentally we just got a new Dell managed switch as the old one just conked tripping the whole rack.
This seems to be a bug in a script. Maybe this is the "ssh script" that you mentioned earlier. Anyway, there are bound to be problems if the users home directory is not set up properly. Please fix that first then we can move on to your mysterious "ssh script".

Cheers,

Evo2.
 
  


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
Creating a user without a home directory. deedawn Linux - Newbie 2 10-29-2008 12:36 PM
Automatically creating user home directories oggy Slackware 1 11-18-2007 06:10 AM
How can I set the permission on the home directory when creating an user crisostomo_enrico Solaris / OpenSolaris 4 09-26-2007 07:24 PM
Creating new user gives empty /home directory rkfb Slackware 8 12-28-2005 12:17 PM
How can I define permissions on a /home/user dir _before_ creating it with adduser skunkburner Linux - General 6 03-18-2004 04:42 PM


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