Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
help: tidy my /etc/passwd and /etc/group
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
fpemud
Apprentice
Apprentice


Joined: 15 Feb 2012
Posts: 190

PostPosted: Tue Nov 20, 2012 3:15 pm    Post subject: help: tidy my /etc/passwd and /etc/group Reply with quote

I'm tidying my /etc/passwd and /etc/group according to this arch wiki

The basic idea is to classify the entries.
For /etc/passwd: "System users" "Real users" "Software users" "Mess"
For /etc/group: "System groups" "Device groups" "Software groups" "Mess"

I have some questions:
1. is my classification correct? is there any "best practice" on this?
2. which uid/gid is critic? I want to assign a uid/gid space for each class.
3. is "device groups" still necessary since i have polkit in my system?
4. is there any way to auto remove the related "Software User/Group" after unmerging a package?

Code:
fpemud-workstation etc # cat /etc/passwd
# System users
root:x:0:0:root:/root:/bin/bash
nobody:x:65534:65534:nobody:/:/bin/false

# Real users
fpemud:x:1000:0:fpemud:/home/fpemud:/bin/bash

# Software users
portage:x:250:250:portage:/var/tmp/portage:/bin/false
messagebus:x:101:249:added by portage for dbus:/dev/null:/sbin/nologin
git:x:1001:1000::/var/lib/gitolite:/bin/bash
sshd:x:22:22:added by portage for openssh:/var/empty:/sbin/nologin
distcc:x:240:2:added by portage for distcc:/dev/null:/sbin/nologin
cron:x:16:16:added by portage for cronbase:/var/spool/cron:/sbin/nologin
games:x:36:35:added by portage for gnugo:/usr/games:/bin/bash
kdm:x:102:105:added by portage for kdm:/var/lib/kdm:/sbin/nologin
ntp:x:123:123:added by portage for ntp:/dev/null:/sbin/nologin
mysql:x:60:60:added by portage for mysql:/dev/null:/sbin/nologin
colord:x:103:102:added by portage for colord:/var/lib/colord:/sbin/nologin
pulse:x:104:999:added by portage for pulseaudio:/var/run/pulse:/sbin/nologin
openvpn:x:105:998:added by portage for openvpn:/dev/null:/sbin/nologin
gdm:x:106:997:added by portage for gdm:/var/lib/gdm:/sbin/nologin
clamav:x:107:996:added by portage for clamav:/dev/null:/sbin/nologin
dhcp:x:108:995:added by portage for dhcp:/var/lib/dhcp:/sbin/nologin
tcpdump:x:109:994:added by portage for tcpdump:/dev/null:/sbin/nologin
qemu:x:77:77:added by portage for libvirt:/dev/null:/sbin/nologin
dnsmasq:x:110:992:added by portage for dnsmasq:/dev/null:/sbin/nologin
oscam:x:111:991:added by portage for oscam:/dev/null:/sbin/nologin
polkitd:x:112:990:added by portage for polkit:/var/lib/polkit-1:/sbin/nologin
ntop:x:113:989:added by portage for ntop:/var/lib/ntop:/sbin/nologin
radvd:x:114:988:added by portage for radvd:/dev/null:/sbin/nologin

# Mess
bin:x:1:1:bin:/bin:/bin/false
daemon:x:2:2:daemon:/sbin:/bin/false
adm:x:3:4:adm:/var/adm:/bin/false
lp:x:4:7:lp:/var/spool/lpd:/bin/false
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
mail:x:8:12:mail:/var/spool/mail:/bin/false
news:x:9:13:news:/usr/lib/news:/bin/false
uucp:x:10:14:uucp:/var/spool/uucppublic:/bin/false
operator:x:11:0:operator:/root:/bin/bash
man:x:13:15:man:/usr/share/man:/bin/false
postmaster:x:14:12:postmaster:/var/spool/mail:/bin/false
smmsp:x:209:209:smmsp:/var/spool/mqueue:/bin/false
ldap:x:439:439::/usr/lib/openldap:/dev/null


Code:
fpemud-workstation etc # cat /etc/group
# System groups
root:x:0:
nobody:x:65534:
nogroup:x:65533:

# Device groups
cdrom:x:19:fpemud
kvm:x:104:fpemud,qemu

# Software groups
sshd:x:22:
games:x:35:fpemud
portage:x:250:portage
messagebus:x:249:
ssmtp:x:248:
cron:x:16:
plugdev:x:247:
crontab:x:246:
kdm:x:105:
vboxusers:x:103:
ntp:x:123:
mysql:x:60:
colord:x:102:
pulse-access:x:101:
pulse:x:999:
openvpn:x:998:
gdm:x:997:
clamav:x:996:
dhcp:x:995:
tcpdump:x:994:
android:x:993:
qemu:x:77:
dnsmasq:x:992:
oscam:x:991:
polkitd:x:990:
ntop:x:989:
radvd:x:988:
git:x:1000:

# Mess
bin:x:1:bin,daemon
daemon:x:2:bin,daemon
sys:x:3:bin,adm
adm:x:4:adm,daemon
tty:x:5:
disk:x:6:adm
lp:x:7:lp
mem:x:8:
kmem:x:9:
wheel:x:10:
floppy:x:11:
news:x:13:news
uucp:x:14:uucp
console:x:17:
audio:x:18:pulse
tape:x:26:
video:x:27:gdm
cdrw:x:80:
usb:x:85:
users:x:100:
utmp:x:406:
man:x:15:
mail:x:12:
lpadmin:x:106:
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 2328
Location: Canada

PostPosted: Tue Nov 20, 2012 4:02 pm    Post subject: Reply with quote

as I see, the ones in 'mess' are the most important :)
Back to top
View user's profile Send private message
fpemud
Apprentice
Apprentice


Joined: 15 Feb 2012
Posts: 190

PostPosted: Tue Nov 20, 2012 10:38 pm    Post subject: Reply with quote

Yeah, ha. I'm still in learning.

It seems no doc describes this 3 things simultaneously: usage, list who use it, use id or name.
it's really takes effort to make sure for each item.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum