LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-24-2005, 07:07 AM   #1
stomach
Member
 
Registered: Sep 2005
Distribution: Debian
Posts: 202

Rep: Reputation: 30
permission /etc/shadow ...


necessary to change the permission of the archive /etc/shadow for 640.

But when I modify the password with the command "passwd" the permission comes back automatically toward 600.

How I decide this problem?
 
Old 12-24-2005, 07:59 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
The shadow file is specifically designed to be read ONLY by root. The point in this file is to prevent people from seeing your encrypted passwords because there are commands like "crack" than can figure out many passwords from their encrypted values. Prior to introduction of the shadow file the encrypted passwords were stored in /etc/passwd and if they weren't properly formed were very easy to break.

Why do you want to make this file 640? Perhaps there's another way to accomplish your purpose that doesn't break intrinsic security of the system.
 
Old 12-24-2005, 08:06 AM   #3
stomach
Member
 
Registered: Sep 2005
Distribution: Debian
Posts: 202

Original Poster
Rep: Reputation: 30
Necessary to leave the archive /etc/shadow with permission 640, and the group "shadow-readers".

It is for implementing module PAM of the apache.

The apache will only go up with this group, to make authentication of the users.

thankz

Last edited by stomach; 12-24-2005 at 08:07 AM.
 
Old 12-24-2005, 08:15 AM   #4
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
My default SuSE installation created the /etc/shadow file as 640 with root:shadow ownership.

It is possible that a Linux hardening technique has made the file 600. Do you have a cron job that runs chkstat? If so you can look at the /etc/permissions, /etc/permissions.local files and the files in /etc/permissions.d if you have these files and directories. These are part of the SuSE configuration. I don't know about other distributions. (I haven't looked into this on Debian yet even though I listed Debian as one of my distros.)
 
Old 12-24-2005, 08:29 AM   #5
stomach
Member
 
Registered: Sep 2005
Distribution: Debian
Posts: 202

Original Poster
Rep: Reputation: 30
My distro is redhat, the problem is in the program "passwd",it modifies the permissions automatically.

It will be that some configuration exists to change this permission?
thankz
 
Old 12-24-2005, 11:43 AM   #6
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
This may have something to do with PAM. I don't know because I have a lot to learn about PAM. See if you can check the PAM configuration files. Look for things to do with the Apache user account or the Apache authorization process. Look at the Red Hat web site for more information about how Red Hat has set up the PAM configuration. Good luck.
 
Old 12-24-2005, 12:24 PM   #7
stomach
Member
 
Registered: Sep 2005
Distribution: Debian
Posts: 202

Original Poster
Rep: Reputation: 30
I already looked for in many places (Site of the PAM module, apache...) I am really difficult to find a solution for this case.

Thankz
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
shadow file os2 Linux - Security 3 10-18-2005 03:20 PM
/etc/shadow- (notice the dash after the word shadow) shellcode Linux - Security 1 09-03-2004 04:54 AM
no shadow entry? netquest1 Linux - General 9 02-22-2004 06:39 PM
shadow passwords dtheorem Linux From Scratch 2 10-18-2003 11:40 PM
Tacacs and etc/shadow daskiew Linux - Networking 1 03-28-2003 03:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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