LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 08-30-2018, 03:16 PM   #1
ruben_shah_j
LQ Newbie
 
Registered: Jul 2018
Posts: 9

Rep: Reputation: Disabled
Question Files which are created/modified while using useradd


What are the file created while using useradd command?

Can we create a custom file using while using useradd command?
 
Old 08-30-2018, 03:23 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Quote:
Originally Posted by ruben_shah_j View Post
What are the file created while using useradd command?

Can we create a custom file using while using useradd command?
Have you employed the useradd command and seen what exactly it does in a system? There are plenty of options to control what it does and therefore what impact it will have on a system. It doesn't always have to create a user's home directory, but it can, and that all depends on how you use the command.


useradd(8) - web based man page, however you should check the version you have on your system and determine what options it supports.
 
Old 08-30-2018, 03:24 PM   #3
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,971

Rep: Reputation: 271Reputation: 271Reputation: 271
I don't remember all of them. Add user fred, then
Code:
ls -lA /home/fred
and see.
 
Old 08-30-2018, 03:29 PM   #4
ruben_shah_j
LQ Newbie
 
Registered: Jul 2018
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rtmistler View Post
Have you employed the useradd command and seen what exactly it does in a system? There are plenty of options to control what it does and therefore what impact it will have on a system. It doesn't always have to create a user's home directory, but it can, and that all depends on how you use the command.


useradd(8) - web based man page, however you should check the version you have on your system and determine what options it supports.
can we add a file inside users home directory when we use useradd command without using any pipeline??
 
Old 08-30-2018, 04:46 PM   #5
lougavulin
Member
 
Registered: Jul 2018
Distribution: Slackware,x86_64,current
Posts: 279

Rep: Reputation: 100Reputation: 100
Quote:
Originally Posted by ruben_shah_j View Post
can we add a file inside users home directory when we use useradd command without using any pipeline??
Everything you put into '/etc/skel' will be copy into its HOME when you create a new user.
 
Old 08-30-2018, 10:12 PM   #6
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,831
Blog Entries: 1

Rep: Reputation: 2070Reputation: 2070Reputation: 2070Reputation: 2070Reputation: 2070Reputation: 2070Reputation: 2070Reputation: 2070Reputation: 2070Reputation: 2070Reputation: 2070
Quote:
Originally Posted by lougavulin View Post
Everything you put into '/etc/skel' will be copy into its HOME when you create a new user.
Not necessarily. e.g. on multiboot systems where /home is a filesystem shared among multiple installations, creation of a new user named e.g. user2 will copy nothing from /etc/skel if /home/user2 already exists.
 
Old 08-31-2018, 01:14 AM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by RandomTroll View Post
I don't remember all of them. Add user fred, then
Code:
ls -lA /home/fred
and see.
not enough.
there's bound to be some entries in system files/folders too.
 
Old 08-31-2018, 03:12 AM   #8
lougavulin
Member
 
Registered: Jul 2018
Distribution: Slackware,x86_64,current
Posts: 279

Rep: Reputation: 100Reputation: 100
Quote:
Originally Posted by mrmazda View Post
Not necessarily. e.g. on multiboot systems where /home is a filesystem shared among multiple installations, creation of a new user named e.g. user2 will copy nothing from /etc/skel if /home/user2 already exists.
Yes, true. Or if the username have existed and have been deleted, but its HOME remains and you want to create an user with this same HOME. But both cases are kind of unusual.
 
  


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
Created new user using useradd problem New2LinuxMN Linux - Newbie 4 09-13-2010 10:34 PM
How do I list recently created/modified files? khvatov Linux - Newbie 3 03-08-2009 10:12 PM
How to Find and remove 7 days before modified/created files neel.gurjar Linux - Software 2 05-14-2008 08:17 PM
Created and Modified date linux2man Linux - Newbie 1 08-13-2007 12:10 PM
Find all files created or modified between 2 times MicahCarrick Linux - Software 3 06-29-2006 04:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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