LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   useradd - No home directory is created (https://www.linuxquestions.org/questions/linux-newbie-8/useradd-no-home-directory-is-created-655319/)

]SK[ 07-12-2008 11:11 AM

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.

brianL 07-12-2008 11:28 AM

Try using:
adduser name
instead in future.

]SK[ 07-12-2008 11:37 AM

Yep thats the one I remember. Thanks!

stress_junkie 07-12-2008 11:58 AM

You could also try setting the default useradd action to create a user home directory by entering
Code:

useradd -m -D

b0uncer 07-12-2008 12:49 PM

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.

]SK[ 07-12-2008 02:57 PM

I doubt your post was any help at all. Thanks.

stress_junkie 07-12-2008 05:07 PM

Quote:

Originally Posted by ]SK[ (Post 3212507)
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.

]SK[ 07-12-2008 05:32 PM

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.

custangro 07-12-2008 05:46 PM

Quote:

Originally Posted by ]SK[ (Post 3212601)
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.

:D

-C

]SK[ 07-12-2008 06:35 PM

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.

custangro 07-12-2008 08:46 PM

Quote:

Originally Posted by ]SK[ (Post 3212630)
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 :twocents:

-c

]SK[ 07-13-2008 04:40 AM

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.

custangro 07-13-2008 11:49 AM

Quote:

Originally Posted by ]SK[ (Post 3212856)
I'm not arguing with anyone.



Really? Then why this?

Quote:

Originally Posted by ]SK[ (Post 3212856)
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)

]SK[ 07-13-2008 12:45 PM

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.

b0uncer 07-13-2008 02:04 PM

Quote:

Originally Posted by ]SK[ (Post 3212601)
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.


All times are GMT -5. The time now is 10:10 PM.