You are not logged in.

#1 2015-02-17 10:26:48

Aton
Member
Registered: 2013-04-02
Posts: 70

What are the correct permissions for /etc/shadow and /etc/gshadow?

Hey,

on my system, the permissions are currently set to 000 for both files
but according to the current PKGBUILD for filesystems, they should be
set to 600:

for f in gshadow shadow crypttab; do
        install -m600 ${srcdir}/${f} etc/
done

As I haven't changed them manually, the "standard" permissions must
have been changed at some point.
Should I just set them to 600?

Last edited by Aton (2015-02-17 10:26:59)

Offline

#2 2015-02-17 11:47:27

Captain Rage
Member
Registered: 2012-02-02
Posts: 45

Re: What are the correct permissions for /etc/shadow and /etc/gshadow?

I am also curious, since I keep seeing an increase of outputs like these when upgrading packages:

warning: directory ownership differs on /var/log/journal/remote/
filesystem: 0:998  package: 0:0

So far I've been trying to manually correct the ownership once such a message showed up, but I am not always sure what the right permissions are supposed to be (like in this case). Some sort of file permission setting, somewhere, is to be suspected as an underlying cause, I think (even though I haven't changed anything myself; I've only been doing normal system/package upgrades). How do I figure out and set the appropriate permissions for different programs?

Offline

#3 2015-02-17 12:44:07

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: What are the correct permissions for /etc/shadow and /etc/gshadow?

Offline

#4 2015-02-20 18:18:26

Captain Rage
Member
Registered: 2012-02-02
Posts: 45

Re: What are the correct permissions for /etc/shadow and /etc/gshadow?

This got me on track how to figure out the right permissions for different system folders and files. As mentioned, I got a bit worried since I've seen a few similar messages while doing updates lately. Thanks!

Offline

#5 2015-03-02 09:01:44

hoschi
Member
From: Ulm (Germany)
Registered: 2008-11-03
Posts: 458

Re: What are the correct permissions for /etc/shadow and /etc/gshadow?

After skim reading I can't find an explanation there!?

[current values]

-rw-r--r-- 1 root root  898 Mar  2 09:35 group
---------- 1 root root  747 Mar  2 09:21 gshadow
-rw-r--r-- 1 root root 1347 Aug 27  2014 passwd
---------- 1 root root  978 Nov 24 09:06 shadow

[package values]

-rw-r--r-- 1 root root 618 Oct 25 20:41 group
-rw------- 1 root root 509 Oct 25 20:41 gshadow
-rw-r--r-- 1 root root 688 Oct 25 20:41 passwd
-rw------- 1 root root 334 Oct 25 20:41 shadow

Why? I will modify the permission according the package.

chmod 600 gshadow shadow

Last edited by hoschi (2015-03-02 09:04:39)

Offline

Board footer

Powered by FluxBB