LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo
User Name
Password
Gentoo This forum is for the discussion of Gentoo Linux.

Notices


Reply
  Search this Thread
Old 11-03-2011, 01:21 PM   #1
smag
LQ Newbie
 
Registered: May 2011
Location: Linux land
Distribution: Arch linux
Posts: 26

Rep: Reputation: 11
Smile What's the group of init?


I start my X server from my /etc/inittab. Now I want to start the X server with the Gid and Uid of my ordinary user. So which is the group and uid of Init?
 
Old 11-03-2011, 01:41 PM   #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
I'm not sure what you mean by that.

To see the user and group init is running as you can type:
ps -eo cmd,user,group |grep init
This shows the command, user and group for processes and the grep limits output to init. You should see something like:
init [5] root root
So init is running as user root and group root. You could use uid,gid instead of user,group if you want the numeric values from /etc/passwd (user) and /etc/group (group) instead of the names.

init is the parent process of all other processes on the system. It can NOT be started manually or killed and you should not muck with how it starts.

Typically what is running in inittab is run as root so you'd have to modify the the "command" portion of the inittab entry to have an "su - <user> -c" in front of a command (or have it in a script and use that as the command). However, I don't know that you can run X Windows itself as a non-root user. Note that even though X Windows is being started by root user it doesn't grant access - you still have to login to the X login screen as either the root or the non-root user of your choice. Why do you think you need to change it to a non-root user?
 
Old 11-03-2011, 02:04 PM   #3
smag
LQ Newbie
 
Registered: May 2011
Location: Linux land
Distribution: Arch linux
Posts: 26

Original Poster
Rep: Reputation: 11
Question

Thanks for the reply.
This is the entry of my inittab:
Quote:
c8:3: once:sudo -u smag -g smag startx
I start my X server with startx. I don't what to use the root user but my ordinary one. So I modified my sudoers file like that:
Quote:
root ALL=(myuser:mygroupuser) startx
but it didn't work. So I'm wondering why it dosen't work.
 
Old 11-04-2011, 03:15 PM   #4
smag
LQ Newbie
 
Registered: May 2011
Location: Linux land
Distribution: Arch linux
Posts: 26

Original Poster
Rep: Reputation: 11
Wink

I changed:
Quote:
sudo -u smag -g smag startx
to:
Quote:
su smag -c startx
And now it works fine.
Thanks for the reply.
 
1 members found this post helpful.
Old 11-04-2011, 03:32 PM   #5
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
Glad you got it going.

Please go to Thread Tools at the top of the page and mark this as "solved". It makes it easier for others to find it when doing web searches later.
 
Old 11-04-2011, 04:59 PM   #6
smag
LQ Newbie
 
Registered: May 2011
Location: Linux land
Distribution: Arch linux
Posts: 26

Original Poster
Rep: Reputation: 11
Talking

Quote:
Originally Posted by MensaWater View Post
Glad you got it going.

Please go to Thread Tools at the top of the page and mark this as "solved". It makes it easier for others to find it when doing web searches later.
Yeah, sorry.
 
  


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
Block bitmap for group 416 not in group (block 0) + group descriptors corrupted? quanta Linux - Server 1 12-08-2010 10:40 AM
What is the exact diff between init 1,init S and init s challavijay Linux - Newbie 1 08-05-2010 06:51 AM
group: add complete group into other group max_mad SUSE / openSUSE 1 04-12-2006 01:43 AM
Group Admin, Group Root, or God over Group crickett Linux - General 5 07-12-2004 04:01 PM
error "Kernel panic: No init found. Try passing init= option Anauj0101 Linux - Newbie 3 05-06-2003 10:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo

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