Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
usually home directory of user is /home/username.When I type # cd /home and long list the file,I see all the users. But here happens two case
1. lets say user tom, I types # id tom, its shows the tom information(UID,GID etc). But I can't see the tom in /home directory. I even tried # grep tom /etc/passwd, no information available. what to do?
2. I created a user with # useradd -M <user-name>. user is created but this user is not present under /home. How would I set/make home directory for this user as /home and that I can see this user.
Last edited by linuxmantra; 04-21-2014 at 11:34 PM.
Create the user's home directory if it does not exist. The files
and directories contained in the skeleton directory (which can be
defined with the -k option) will be copied to the home directory.
By default, if this option is not specified and CREATE_HOME is not
enabled, no home directories are created.
Do no create the user's home directory, even if the system wide
setting from /etc/login.defs (CREATE_HOME) is set to yes.
This can also happen when using things like NIS or LDAP to hold login information. The login data exists, but the account on the specific system doesn't.
Yes you are right. If the user is under IdM ( Identity Management) then user information (#id <user name>) can be seen but can't be seen in /home directory which is the defautl home directory. In order to see the user in /home directory, we need to do
#cp -rp /etc/skel/ <user-name>
The user will be seen in /home directory. And this was the reason why I earlier did not see the user in /home directory. So, in IdM user can be granted read only access which I camed to know while working in this issue with the team in my office.
Indeed, command you're looking for is '-m', not '-M'. Capitalization is important in pretty much every computer system out there, 'm' and 'M' and completely different characters.
I can create user with -M option (-M does not create home directory) as #useradd -M <user name> , proble with doing this is, this user can't be seen in /home directory. In order to see the user in /home directory we need to do
#cp -rp /etc/skel/ <user name>