LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-29-2021, 11:33 PM   #1
merc718
LQ Newbie
 
Registered: Jan 2021
Posts: 11

Rep: Reputation: Disabled
I create a user but cant see their files


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?
 
Old 01-30-2021, 12:19 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
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.
 
1 members found this post helpful.
Old 01-30-2021, 10:08 AM   #3
merc718
LQ Newbie
 
Registered: Jan 2021
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
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.

UI has spoiled me.

Thank you for your time.

Last edited by merc718; 01-30-2021 at 10:09 AM.
 
Old 01-30-2021, 10:30 AM   #4
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,686

Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
I am not too familiar with adduser.
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.
 
1 members found this post helpful.
Old 01-30-2021, 10:52 AM   #5
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,667

Rep: Reputation: Disabled
Contents of /etc/skel/ is copied over when you create a new user. You as a sysadmin can put in /etc/skel/ everything you want your new users to have.
 
1 members found this post helpful.
  


Reply



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
How read only users from Nagios can see only their hostgroup along with their hosts mrwlad Linux - Server 6 10-02-2012 09:16 AM
Rename pdf files after their directory name and acoording to their total number IlIl7 Linux - Newbie 3 07-06-2012 04:09 PM
Router cant see one partition, but can see another mutexe Linux - Wireless Networking 1 10-26-2009 05:44 PM
Suse 9.2 Samba, cant see Windows computers, but they can see Linux Whiskers Linux - Networking 6 05-08-2005 04:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:20 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
Open Source Consulting | Domain Registration