GDM home directory

Installing, Configuring, Troubleshooting server daemons such as Web and Mail
Post Reply
mtony75
Posts: 2
Joined: 2011/11/08 17:31:14
Contact:

GDM home directory

Post by mtony75 » 2011/11/08 17:38:18

I am in the process of securing a Cent OS 5.7 box. Unfortunately the current setup of the home directory for the Gnome Display Manager (GDM) is in violation of the user home directory policy I am supposed to follow. Namely, the home directory for user gdm (/var/gdm) contains files owned by another user (root). Does anyone know if you can either change the home directory in /etc/passwd for gdm without affecting the operation and performance of Gnome? If not can the files ownership be changed to user gdb? Thank you in advance for any help you can provide.

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

GDM home directory

Post by gerald_clark » 2011/11/09 15:15:14

Welcome to CentOS.
New users need to read:
http://www.centos.org/modules/newbb/viewforum.php?forum=47

There are login users ( user number 500 and above ) whose home is generally in /home.
There are system users ( user numbers below 500 ). Don't mess with the system users.

mtony75
Posts: 2
Joined: 2011/11/08 17:31:14
Contact:

Re: GDM home directory

Post by mtony75 » 2011/11/10 17:25:52

Thanks. I was hoping there was a way to change the home directory for the service account but I just password locked it and will write an explanation. Again thanks.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: GDM home directory

Post by pschaff » 2011/11/10 22:50:57

[code]
# grep gdm /etc/passwd
gdm:x:42:42::/var/gdm:/sbin/nologin[/code]
When the shell is "/sbin/nologin" both the policy concern and your action are moot.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: GDM home directory

Post by TrevorH » 2011/11/10 23:35:02

[quote]
Namely, the home directory for user gdm (/var/gdm) contains files owned by another user (root).
[/quote]

[u]Which[/u] files are we talking about? Just checked my CentOS 6 system and it has no files in /var/gdm at all.

User avatar
AlanBartlett
Forum Moderator
Posts: 9345
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: GDM home directory

Post by AlanBartlett » 2011/11/11 04:33:03

[quote]
TrevorH wrote:
[quote]
Namely, the home directory for user gdm (/var/gdm) contains files owned by another user (root).
[/quote]

[u]Which[/u] files are we talking about? Just checked my CentOS 6 system and it has no files in /var/gdm at all.[/quote]
The query has been raised in the "[i]CentOS 5 - Server Support[/i]" forum, [b]Trevor[/b]. :oops:

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: GDM home directory

Post by TrevorH » 2011/11/11 09:26:11

Yes, unfortunately I have no C5 system with GDM installed so I cannot check there. Is it substantially different in C5?

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: GDM home directory

Post by pschaff » 2011/11/11 11:30:35

Continuing with the thread hijacking - Apparently.[code]
# ls -RAlF /var/gdm
/var/gdm:
total 12
-rw-r--r-- 1 root root 45 Nov 10 15:02 :0.Xauth
-rw------- 1 root root 33 Nov 10 15:02 .cookie
drwxr-xr-x 2 gdm gdm 4096 Mar 15 2009 .fontconfig/
prw-rw---- 1 root root 0 Nov 10 15:02 .gdmfifo|

/var/gdm/.fontconfig:
total 52
-rw-r--r-- 1 gdm gdm 8008 Mar 15 2009 43759d6532d7c8fa2377cba0d6368316-x86.cache-2
-rw-r--r-- 1 gdm gdm 22832 Mar 15 2009 b79f3aaa7d385a141ab53ec885cc22a8-x86.cache-2
-rw-r--r-- 1 gdm gdm 18288 Mar 15 2009 beeeeb3dfe132a8a0633a017c99ce0c0-x86.cache-2
# uname -rmi
2.6.18-274.7.1.el5 i686 i386
# cat /etc/redhat-release
CentOS release 5.7 (Final)[/code]
I almost used EL6 info in my initial reply. :-)[code]
# grep gdm /etc/passwd
gdm:x:42:42::/var/lib/gdm:/sbin/nologin[/code]
Does not really change my conclusion, nor my violent agreement with Gerald's advice - "Don't mess with the system users."!!!

User avatar
AlanBartlett
Forum Moderator
Posts: 9345
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: GDM home directory

Post by AlanBartlett » 2011/11/11 20:39:50

[quote]
Yes, unfortunately I have no C5 system with GDM installed so I cannot check there. Is it substantially different in C5?
[/quote]
Aparently so.

From [b]CentOS 5.7[/b] --

[code]
[ajb@GX1 ~]$ ls -RAlF /var/gdm
ls: /var/gdm: Permission denied
[ajb@GX1 ~]$ sudo ls -RAlF /var/gdm
/var/gdm:
total 28
-rw-r----- 1 root root 45 Nov 10 21:30 :0.Xauth
-rw-r--r-- 1 root root 63 Nov 11 17:37 :0.Xservers
-rw------- 1 root root 33 Nov 8 15:56 .cookie
prw-rw---- 1 root root 0 Nov 8 15:56 .gdmfifo|
[ajb@GX1 ~]$ cat /etc/redhat-release
CentOS release 5.7 (Final)
[ajb@GX1 ~]$ grep gdm /etc/passwd
gdm:x:42:42::/var/gdm:/sbin/nologin
[ajb@GX1 ~]$
[/code]
From [b]RHEL 6.1[/b] --

[code]
[ajb@Duo2 ~]$ ls -RAlF /var/gdm
ls: cannot open directory /var/gdm: Permission denied
[ajb@Duo2 ~]$ sudo ls -RAlF /var/gdm
/var/gdm:
total 0
[ajb@Duo2 ~]$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.1 (Santiago)
[ajb@Duo2 ~]$ grep gdm /etc/passwd
gdm:x:42:42::/var/lib/gdm:/sbin/nologin
[ajb@Duo2 ~]$
[/code]

Post Reply