Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I created a user, 'sudo adduser usrname', then i tired to ls and search the new users home directory but it didnt work. i also tired to 'su usrname' to the user and still couldnt go into the users home directory. What am i doing wrong?
What distro is this?
Which commands do you issue, and what happens? Do you get error messages or otherwise unexpected output?
After su usrname, what do you do to go into the user's home directory, and what happens when you try?
Have you tried su - usrname? This will essentially log you on and automatically go to usrname's home.
I am not too familiar with adduser. If this is Debian or a distro derived from Debian, the command useradd is configured to not create the home directory, and you have to issue useradd -m to create the user's home. If your distro is from the RHEL family, the default is creation of the user's home, and you just run useradd without the -m option.
Last edited by berndbausch; 01-30-2021 at 12:20 AM.
What distro is this?
Which commands do you issue, and what happens? Do you get error messages or otherwise unexpected output?
After su usrname, what do you do to go into the user's home directory, and what happens when you try?
Have you tried su - usrname? This will essentially log you on and automatically go to usrname's home.
I am not too familiar with adduser. If this is Debian or a distro derived from Debian, the command useradd is configured to not create the home directory, and you have to issue useradd -m to create the user's home. If your distro is from the RHEL family, the default is creation of the user's home, and you just run useradd without the -m option.
sry i thought i was clear.
but, i figured it out. there were only hidden files in the home folder. i had to use 'ls -a' to see all the contents of the file. i assumed the directory came pre-pupulated with other files.
adduser is a Debian-specific tool. It's preferable on Debian-based distros over the standard useradd. Debian Wiki and all Debian official docs use adduser when discussing creation of new user accounts.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.