LinuxQuestions.org
Help answer threads with 0 replies.
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 08-17-2013, 07:17 AM   #1
GeorgeSKJ
LQ Newbie
 
Registered: Jul 2013
Posts: 3

Rep: Reputation: Disabled
Smile background process for useradd command


Hi,

Good evening..!!

Can anyone help me to know the background process/ daemon which creates user's home directory when we do a useradd <user_name> in RHEL.

Many Thanks,

George
 
Old 08-17-2013, 08:49 AM   #2
Doc CPU
Senior Member
 
Registered: Jun 2011
Location: Stuttgart, Germany
Distribution: Mint, Debian, Gentoo, Win 2k/XP
Posts: 1,099

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Hi there,

Quote:
Originally Posted by GeorgeSKJ View Post
Can anyone help me to know the background process/ daemon which creates user's home directory when we do a useradd <user_name> in RHEL.
what makes you think there is some background task or daemon involved? I'd rather assume that creating the new user's home dir is an integral part of the work the useradd utility does, as well as adding an entry to /etc/passwd and /etc/group for the new user.

Which reminds me of a question I've wanted to ask for a long time. Traditionally, there's the two files /etc/passwd and /etc/group that contain all information about users and groups. But I've seen occasionally that some distros seem to use /etc/shadow for apparently the same purpose as /etc/passwd - sometimes even both of them exist.
Apart from that, I can't help noticing that this not only depends on the distro, but can probably be configured, because I've seen some Debians using /etc/passwd, and I've seen some using /etc/shadow.

What's the difference, and what's the point in using something different?

[X] Doc CPU
 
Old 08-17-2013, 09:00 AM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Quote:
Originally Posted by Doc CPU View Post
Which reminds me of a question I've wanted to ask for a long time. Traditionally, there's the two files /etc/passwd and /etc/group that contain all information about users and groups. But I've seen occasionally that some distros seem to use /etc/shadow for apparently the same purpose as /etc/passwd - sometimes even both of them exist.
In a nutshell:

The shadow packages makes handling passwords in a secure way possible.

Both /etc/passwd and /etc/group are world readable, /etc/shadow is not (owner root)rw), group shadow(r)). Without shadow the (encrypted) password is stored in /etc/passwd and thus easily accessible by anybody (think: rainbow tables).

Both /etc/passwd and /etcgroup have to be present, using shadow will migrate some of the info to the more secure /etc/shadow file.
 
Old 08-17-2013, 09:18 AM   #4
Doc CPU
Senior Member
 
Registered: Jun 2011
Location: Stuttgart, Germany
Distribution: Mint, Debian, Gentoo, Win 2k/XP
Posts: 1,099

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Hi there,

Quote:
Originally Posted by druuna View Post
Both /etc/passwd and /etc/group are world readable, /etc/shadow is not (owner root)rw), group shadow(r)). Without shadow the (encrypted) password is stored in /etc/passwd and thus easily accessible by anybody (think: rainbow tables).

Both /etc/passwd and /etcgroup have to be present, using shadow will migrate some of the info to the more secure /etc/shadow file.
okay, I think I understood that so far, thank you. But that leaves a question that bothers me: What would I have to do to set up the system for NOT using a shadow file? I dimly remember that I was asked a question aiming into that direction when I installed Debian in a VM. But can the behavior be changed after installation? I'm sure it can, but how?

[X] Doc CPU
 
Old 08-17-2013, 09:39 AM   #5
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Quote:
Originally Posted by Doc CPU View Post
What would I have to do to set up the system for NOT using a shadow file?

I dimly remember that I was asked a question aiming into that direction when I installed Debian in a VM. But can the behavior be changed after installation? I'm sure it can, but how?
I'm not sure that can be easily done. On Debian, shadow is part of the passwd package so it isn't as simple as aptitude remove shadow. You might be able to use pwunconv and grpunconv but I'm not sure how deep shadow is integrated into Debian.

BTW: Not using shadow is seen as a severe security risk.

BTW2: We are hijacking GeorgeSKJ's thread, lets keep this on topic
 
Old 08-17-2013, 10:00 AM   #6
Doc CPU
Senior Member
 
Registered: Jun 2011
Location: Stuttgart, Germany
Distribution: Mint, Debian, Gentoo, Win 2k/XP
Posts: 1,099

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Hi there,

Quote:
Originally Posted by druuna View Post
BTW: Not using shadow is seen as a severe security risk.
using encryption and exaggerated access control on a PC on which I'm the only user is paranoia and a nuisance, especially on little embedded or special-purpose machines. Considering a real multi-user shared machine, or an exposed server on a public network, however, I'd agree.

Quote:
Originally Posted by druuna View Post
BTW2: We are hijacking GeorgeSKJ's thread, lets keep this on topic
We're not hijacking, but rather enriching it, which is usually a positive aspect. ;-)
Btw, as to my knowledge, the original question has been answered already.
Or was my assumption wrong? Then may somebody please correct me.

[X] Doc CPU
 
  


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
can't find my jboss process with ps aux, what is the command to list background proce Niceman2005 Linux - General 3 08-18-2012 05:11 AM
Command or function in C to make the process run in background sowpra Linux - Newbie 4 05-02-2012 12:56 AM
[SOLVED] Problem with a function having a background process inside a command substitution rylphs Linux - Newbie 2 10-05-2010 10:36 AM
sending remote command to background process + out log c0m4r Linux - Newbie 6 02-02-2010 04:34 AM
[SOLVED] which background file is read by "useradd" command ? vikas027 Solaris / OpenSolaris 1 05-09-2008 01:02 AM

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

All times are GMT -5. The time now is 06:04 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