LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 07-12-2008, 12:11 PM   #1
]SK[
Member
 
Registered: Jun 2004
Location: Nottingham, England
Posts: 89

Rep: Reputation: 15
useradd - No home directory is created


I have just installed the latest version of Arch Linux. Basic install.
I want to create a new user which works except the users home directory isn't created.

A "useradd -D" shows...

GROUP=100
HOME=/home
INACTIVE=-1
EXPIRE=
SHELL=/bin/bash
SKEL=/etc/skel
CREATE_MAIL_SPOOL=no

Ideas?

*Edit*

Ugh ignore me. Seems I need a -m to make a home directory. Im sure I didnt need to add that switch last time i used nix.

Last edited by ]SK[; 07-12-2008 at 12:16 PM.
 
Old 07-12-2008, 12:28 PM   #2
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.1
Posts: 7,134
Blog Entries: 52

Rep: Reputation: Disabled
Try using:
adduser name
instead in future.

Last edited by brianL; 07-12-2008 at 12:30 PM.
 
Old 07-12-2008, 12:37 PM   #3
]SK[
Member
 
Registered: Jun 2004
Location: Nottingham, England
Posts: 89

Original Poster
Rep: Reputation: 15
Yep thats the one I remember. Thanks!
 
Old 07-12-2008, 12:58 PM   #4
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
You could also try setting the default useradd action to create a user home directory by entering
Code:
useradd -m -D
 
Old 07-12-2008, 01:49 PM   #5
b0uncer
Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
I doubt if that question was necessary had you read
Code:
man useradd
or
Code:
useradd --help
First read manual/docs, then ask if you don't understand.
 
Old 07-12-2008, 03:57 PM   #6
]SK[
Member
 
Registered: Jun 2004
Location: Nottingham, England
Posts: 89

Original Poster
Rep: Reputation: 15
I doubt your post was any help at all. Thanks.
 
Old 07-12-2008, 06:07 PM   #7
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
Quote:
Originally Posted by ]SK[ View Post
I doubt your post was any help at all. Thanks.
b0uncer makes a good point. It wouldn't hurt you to do a little research before you post a question when the answer is just a few keystrokes away.

Last edited by stress_junkie; 07-12-2008 at 06:11 PM.
 
Old 07-12-2008, 06:32 PM   #8
]SK[
Member
 
Registered: Jun 2004
Location: Nottingham, England
Posts: 89

Original Poster
Rep: Reputation: 15
I guess 99% of 'help' threads can be answered by people doing research. Besides the command I should have been using was adduser not useradd. Man wouldn't have told me that. This thread was answered with another command from someone else which I thanked them for. Was there really a need for someone to come across after the thread is pretty much finished and put their opinion across?
I am not a frequent linux user. I forget commands I have used in the past. I didn't forget how to use man hence me even editing the first post to say I had found what I was looking for. From memory though I didn't ever remember having to use switches. It's obvious now that in the past I was using adduser.
 
Old 07-12-2008, 06:46 PM   #9
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , Solaris 10, RHEL
Posts: 1,935
Blog Entries: 1

Rep: Reputation: 188Reputation: 188
Quote:
Originally Posted by ]SK[ View Post
I guess 99% of 'help' threads can be answered by people doing research. Besides the command I should have been using was adduser not useradd. Man wouldn't have told me that. This thread was answered with another command from someone else which I thanked them for. Was there really a need for someone to come across after the thread is pretty much finished and put their opinion across?
I am not a frequent linux user. I forget commands I have used in the past. I didn't forget how to use man hence me even editing the first post to say I had found what I was looking for. From memory though I didn't ever remember having to use switches. It's obvious now that in the past I was using adduser.
Actually b0uncer was trying to help you...

I know it seems that it may be "rude" but wouldn't you rather "learn to fish" instead of having someone "hand you a fish"?

Another good resource is http://www.google.com/linux

Personal opinion; but I learn more when I "struggle" with the problem and find a solution on my own...

Anyway you can be mad if you want...but you won't learn anything...

But if you don't care to learn anything then it's no big deal....b0uncer just wanted to help.



-C
 
Old 07-12-2008, 07:35 PM   #10
]SK[
Member
 
Registered: Jun 2004
Location: Nottingham, England
Posts: 89

Original Poster
Rep: Reputation: 15
I help other people all day long on other forums. However these are Windows users. I too know the frustration when someone doesn't even attempt to try or research before simply getting someone else to work it out for them. I asked a 'Newbie' question and shortly after found a solution myself (using research), hence my *Edit*. I welcome advice, but is there the need to be sarcastic with it?
I don't quite agree with your handing a fish theory. Why do schools, colleges, universities, books, guides and so on exist? The whole world learns from the knowledge of others. This site is another example of that. In any case, no I came here for advice from others whom have more knowledge than myself in this subject.
 
Old 07-12-2008, 09:46 PM   #11
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , Solaris 10, RHEL
Posts: 1,935
Blog Entries: 1

Rep: Reputation: 188Reputation: 188
Quote:
Originally Posted by ]SK[ View Post
I don't quite agree with your handing a fish theory. Why do schools, colleges, universities, books, guides and so on exist? The whole world learns from the knowledge of others. This site is another example of that. In any case, no I came here for advice from others whom have more knowledge than myself in this subject.
Agreed...but Teachers don't do the work for you. They provide you the tools in order for you to do the work.

Example...

Giving you a fish: "Use useradd -m"

Teaching you to fish: "Read the man pages on useradd and read about using -m"

See the difference?

b0uncer and I were only trying to help (granted that b0uncer was coerce with his answer). If you keep arguing with people who are trying to help then you will soon find that no one will.

My

-c

Last edited by custangro; 07-12-2008 at 09:47 PM.
 
Old 07-13-2008, 05:40 AM   #12
]SK[
Member
 
Registered: Jun 2004
Location: Nottingham, England
Posts: 89

Original Poster
Rep: Reputation: 15
I still don't agree with your teacher argument. Teachers don't just produce a list of books for you to read and just let you go study them for a year before sending you off for an exam. If this was the case we wouldn't have teachers at all.

I'm not arguing with anyone. Everyone is entitled to their own opinion. As you said though he was sarcastic with his reply which I feel was unjust. If someone said this to you would you not be annoyed? His signature also encourages people to ask, no matter how simple/stupid a question might be.
 
Old 07-13-2008, 12:49 PM   #13
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , Solaris 10, RHEL
Posts: 1,935
Blog Entries: 1

Rep: Reputation: 188Reputation: 188
Quote:
Originally Posted by ]SK[ View Post
I'm not arguing with anyone.


Really? Then why this?

Quote:
Originally Posted by ]SK[ View Post
I still don't agree with your teacher argument. Teachers don't just produce a list of books for you to read and just let you go study them for a year before sending you off for an exam. If this was the case we wouldn't have teachers at all.

Good luck in your learning endeavors.

-C
(unsubscribing to this tread)
 
Old 07-13-2008, 01:45 PM   #14
]SK[
Member
 
Registered: Jun 2004
Location: Nottingham, England
Posts: 89

Original Poster
Rep: Reputation: 15
You see, now your twisting words. I have a disagreement with your argument/theory/point whatever you wish to call it. You yourself have turned what was a discussion into a retort. I read now your last post to be an argument.

Since you mention you won't be reading this thread again can we all just let the thread RIP as it should have done way back at post #3? Thanks.
 
Old 07-13-2008, 03:04 PM   #15
b0uncer
Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Quote:
Originally Posted by ]SK[ View Post
I guess 99% of 'help' threads can be answered by people doing research. Besides the command I should have been using was adduser not useradd. Man wouldn't have told me that. This thread was answered with another command from someone else which I thanked them for. Was there really a need for someone to come across after the thread is pretty much finished and put their opinion across?
I am not a frequent linux user. I forget commands I have used in the past. I didn't forget how to use man hence me even editing the first post to say I had found what I was looking for. From memory though I didn't ever remember having to use switches. It's obvious now that in the past I was using adduser.
I'm sorry if you got me wrong, I didn't mean to be rude or anything -- it's just a fact that the help mechanisms I mentioned would have helped you out faster than this forum, had you read them.

The idea of forums like this isn't just that a person asks a question, another person answers it and the thread is then deleted because it was answered and was "pretty much finished"; if you have been writing in other places as well, you should know that it's not just the two persons reading the thing, but many others as well. And though that one answer may solve your problem in your case, it might not serve the other readers out there; that's why providing extra information, more precise information, other kind of solutions or comments on the previous answers is valuable, because in a good case is helps not only the original poster but others as well. In addition I consider humans to be creatures that learn, and while the first answer might satisfy your one-time need, the second answer (or third, fourth, ...) might give you information that helps you later on; when you wonder about another thing you just might check if there's a man-page or "--help" switch or similar and find answer for that problem without spending time on the internet, waiting for answers from people who don't get paid for answering.

And if you got your answer, why did you then come back, read the other posts, get irritated by them and even go as far as doing several replies to them for nothing? Besides: neither of adduser or useradd was the "right" executable to run in your case, since they can both do the job.

Don't take offense so easily; if you do, you're unable to help other people on other forums, because you'll just end up spending your energy arguing about things. If you get information, call it a treasure, even if you didn't ask for it.
 
  


Reply

Tags
home directory, 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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
useradd: cannot create directory /home/ amirzkria Red Hat 5 08-07-2014 10:11 AM
Defining home directory of a newly created user?? ggarrette Linux - Newbie 4 07-01-2008 03:47 PM
Useradd not creating home directory when creating newuser meneedham Linux - Newbie 4 10-05-2007 01:11 PM
Created new home directory and lost my files jnewby72 Linux - General 4 01-26-2006 12:25 AM


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

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