LinuxQuestions.org
Review your favorite Linux distribution.
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-16-2012, 02:28 PM   #1
zamek
LQ Newbie
 
Registered: Aug 2012
Location: Pennsylvania, USA
Posts: 3

Rep: Reputation: Disabled
Processes running with incorrect group id


My server is running a CentOS Linux 5.8 and most of the server's processes are running with a user id of 0 (root) and group id of 500 (adam). The primary group for user root is root. The adam group was created when I created the first user adam. I've tried modifying root's primary group but still have the same problem.

How do I get all of the processes to run under the proper group id?

Code:
PID USER     GROUP    COMMAND
    1 root     adam     init [3]      
 1119 root     adam     /sbin/udevd -d
 1459 root     adam     syslogd -m 0
 1470 root     adam     /usr/sbin/sshd
 1478 root     adam     xinetd -stayalive -pidfile /var/run/xinetd.pid
 1514 root     adam     /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --pid-file=/var/run/mysqld/mysqld.pid --basedir=/usr --user=mysql
 1609 mysql    mysql    /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.sock
 3495 root     adam     lfd - sleeping
 3521 root     adam     sendmail: accepting connections
 3532 smmsp    smmsp    sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue
 3542 root     adam     /usr/sbin/httpd
 3543 apache   apache   /usr/sbin/httpd
 3551 root     adam     crond
 3559 root     adam     /usr/sbin/saslauthd -m /var/run/saslauthd -a pam -n 2
 3560 root     adam     /usr/sbin/saslauthd -m /var/run/saslauthd -a pam -n 2
 3568 root     adam     /usr/bin/perl /usr/libexec/webmin/miniserv.pl /etc/webmin/miniserv.conf
 3593 root     adam     sshd: adam [priv]
 3597 adam     adam     sshd: adam@pts/0 
 3598 adam     adam     -bash
 5133 root     adam     sudo ps -eo pid,user,group,args
 5134 root     root     ps -eo pid,user,group,args
 
Old 08-16-2012, 06:02 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,369

Rep: Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753
Show the entries for root and adam in /etc/passwd. Also, all entries in /etc/group for both users as well.
Note that in reality, its all done with numbers, specifically uid, gid. The names are found by the tools like top, ls etc by x-referencing those files.
 
Old 08-16-2012, 07:40 PM   #3
zamek
LQ Newbie
 
Registered: Aug 2012
Location: Pennsylvania, USA
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thank you for your reply.

/etc/passwd
root:x:0:0:root:/root:/bin/bash
adam:x:500:500:Adam:/home/adam:/bin/bash

/etc/group
root::0:root
adam::500:
 
Old 08-16-2012, 09:00 PM   #4
zamek
LQ Newbie
 
Registered: Aug 2012
Location: Pennsylvania, USA
Posts: 3

Original Poster
Rep: Reputation: Disabled
Update:

I also set the 'Set GID' bit on the init file which ran init as the group 'root' but the other processes spawned by init still ran with the 'adam' group.
 
  


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
Running out of space due to an incorrect mounting JamesMore Linux - Newbie 15 12-17-2011 02:57 PM
limit download for processes inside a control group alephan Linux - Kernel 1 08-10-2011 02:34 PM
LXer: Putting a Group of Processes into a CPU and Memory Jail -- First Steps with Control Groups in LXer Syndicated Linux News 0 06-04-2011 04:30 PM
I want a group to nice and renice the processes of other users of the same group tim_c Linux - Newbie 1 01-05-2007 05:39 AM
closing a group of processes? minm Linux - Newbie 2 04-10-2005 03:26 PM

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

All times are GMT -5. The time now is 08:45 AM.

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