WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: group ids  (Read 7138 times)

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
group ids
« on: April 24, 2016, 04:52:01 AM »
hi friends,

in tinycore the group id 1000 is used for messagebus.

in many distributions the group id for normal users start with 500 or 1000.

in debian i use f.e. the group user with the id 1000 for my first normal user account 1000.
user:x:1000:1000:user,,,:/home/user:/bin/bash

https://www.debian.org/doc/manuals/system-administrator/ch-sysadmin-users.html

when i pack a different debian installation with
tar czvfp debian_backup.tgz /
then my user group with the id 1000 gets the group messagebus.

what do you recommend?
is it a problem to change the usergroup messagebus to a different id?
is there a mistake in my tar-command that there is an issue with my group-ids in the tar-file?

thank you for every hint and help.
« Last Edit: April 24, 2016, 04:58:06 AM by netnomad »

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: group ids
« Reply #1 on: April 24, 2016, 07:38:49 PM »
I see what you are talking about, my Debian/Ubuntu HD install uses 1000 for my user acct.  Will look into it.

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: group ids
« Reply #2 on: April 25, 2016, 08:10:36 PM »
Ok, I have made dbus.deb2sce create the messagebus group id as system, and to make the standard user group id 1000 to keep with Debian standards. Please re-import anything containing dbus package and use the latest release candidate to test.  But I don't recommend sharing the /etc/group file among different installs as much of that file is created dynamically.

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: group ids
« Reply #3 on: April 25, 2016, 10:31:21 PM »
hi jason,

while in debian my user:user gets the ids 1000:1000,
tc provides now for tc:staff the ids 1001:50.
group 1000 is configured for pulse-access.

tc@box:~$ version -r
You are running dCore-jessie:2016.04.25.21.13, the latest release candidate.


tc@box:~$ sudo cat /etc/passwd
root:x:0:0:root:/root:/bb/ash
lp:x:7:7:lp:/var/spool/lpd:/bb/ash
nobody:x:65534:65534:nobody:/nonexistent:/bin/false
tc:x:1001:50:Linux User,,,:/home/tc:/bin/bash
libuuid:x:100:1002::/var/lib/libuuid:/bin/sh
sshd:x:101:100:Linux User,,,:/home/sshd:/bin/false
messagebus:x:1000:1000:Linux User,,,:/home/messagebus:/bin/sh
pulse:x:102:29:PulseAudio daemon:/var/run/pulse:/bin/false
avahi:x:103:113:Avahi mDNS daemon,,,:/var/run/avahi-daemon:/bin/false


tc@box:~$ sudo cat /etc/group
root:x:0:
daemon:x:1:
bin:x:2:
sys:x:3:
adm:x:4:
tty:x:5:tc
disk:x:6:
lp:x:7:
mail:x:8:
news:x:9:
uucp:x:10:
man:x:12:
proxy:x:13:
kmem:x:15:
dialout:x:20:tc
fax:x:21:
voice:x:22:
cdrom:x:24:tc
floppy:x:25:
tape:x:26:
sudo:x:27:
audio:x:29:tc,pulse
dip:x:30:
www-data:x:33:
backup:x:34:
operator:x:37:
list:x:38:
irc:x:39:
src:x:40:
gnats:x:41:
shadow:x:42:
utmp:x:43:
video:x:44:tc
sasl:x:45:
plugdev:x:46:tc
staff:x:50:
games:x:60:
users:x:100:
plugdev:x:101:tc
colord:x:109:
messagebus:x:110:messagebus
avahi:x:113:
netdev:x:114:tc
bluetooth:x:115:
pulse:x:116:
Debian-gdm:x:119:
nogroup:x:65534:
utempter:x:1001:
debian-transmission:x:1005:debian-transmission
uuidd:x:1002:libuuid
sshd:x:102:sshd
lpadmin:x:103:
pulse-access:x:1000:
systemd-journal:x:104:


thank you for your help.
« Last Edit: April 25, 2016, 10:35:26 PM by netnomad »

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: group ids
« Reply #4 on: April 26, 2016, 05:05:01 PM »
Are either of those files in your backup? 

My two files are below, and all is working well on my setup.  Group id 50, staff, for the user is normal for Core/dCore.  Being Tinycore first and foremost, I only want to change things to being Debian friendly when it is necessary and something in dCore won't work otherwise.

Code: [Select]
jason@box:~$ cat /etc/passwd
root:x:0:0:root:/root:/bb/ash
lp:x:7:7:lp:/var/spool/lpd:/bb/ash
nobody:x:65534:65534:nobody:/nonexistent:/bin/false
tc:x:1001:50:Linux User,,,:/home/tc:/bb/ash
jason:x:1000:50:Linux User,,,:/home/jason:/bb/sh
libuuid:x:100:1002::/var/lib/libuuid:
messagebus:x:1002:1000:Linux User,,,:/home/messagebus:/bin/sh
sshd:x:101:100:Linux User,,,:/home/sshd:/bin/false
pulse:x:102:29:PulseAudio daemon:/var/run/pulse:/bin/false
usbmux:x:103:46:usbmux daemon,,,:/home/usbmux:/bin/false
jason@box:~$
jason@box:~$
jason@box:~$ cat /etc/group
root:x:0:
daemon:x:1:
bin:x:2:
sys:x:3:
adm:x:4:
tty:x:5:jason
disk:x:6:
lp:x:7:
mail:x:8:
news:x:9:
uucp:x:10:
man:x:12:
proxy:x:13:
kmem:x:15:
dialout:x:20:jason
fax:x:21:
voice:x:22:
cdrom:x:24:jason
floppy:x:25:
tape:x:26:
sudo:x:27:
audio:x:29:jason,pulse
dip:x:30:
www-data:x:33:
backup:x:34:
operator:x:37:
list:x:38:
irc:x:39:
src:x:40:
gnats:x:41:
shadow:x:42:
utmp:x:43:
video:x:44:jason
sasl:x:45:
plugdev:x:46:jason
staff:x:50:jason
games:x:60:
users:x:100:
plugdev:x:101:jason
colord:x:109:
messagebus:x:110:messagebus
avahi:x:113:
netdev:x:114:jason
bluetooth:x:115:
pulse:x:116:
Debian-gdm:x:119:
nogroup:x:65534:
utempter:x:1001:
debian-transmission:x:1005:debian-transmission
jason:x:1000:
clamav:x:1003:clamav
lpadmin:x:102:
uuidd:x:1002:libuuid
sshd:x:103:sshd
pulse-access:x:1004:
systemd-journal:x:104:
jason@box:~$


Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: group ids
« Reply #5 on: April 26, 2016, 10:35:31 PM »
hi jason,

yes, you are right... i had passwd in my backup.

now my fresh passwd looks like that:
tc@box:~$ cat /etc/passwd
root:x:0:0:root:/root:/bb/ash
lp:x:7:7:lp:/var/spool/lpd:/bb/ash
nobody:x:65534:65534:nobody:/nonexistent:/bin/false
tc:x:1001:50:Linux User,,,:/home/tc:/bb/ash
sshd:x:100:102:Linux User,,,:/home/sshd:/bin/false
messagebus:x:101:110:Linux User,,,:/home/messagebus:/bin/false
pulse:x:102:29:PulseAudio daemon:/var/run/pulse:/bin/false

so messagebus:messagebus uses the ids 101:110, instead of 1000:1000 ...

probably my problem is solved... :-)
thank you for your help.

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: group ids
« Reply #6 on: April 27, 2016, 10:48:15 AM »
hi jason,

in my /etc/group i have got
pulse-access:x:1000:

is it possible to use the group-id 1000 for the group user?
how did pulse-access got the group id 1000?
is it possible to change the group id without any further major problems?

i want to get the user user:user with 1000:1000...
what do you recommend?
is it possible
- to login passwordless with the user:user?
- without a change in passwd, configured and saved in the backup?
- with the boot-code user=user to substitute completely the user tc?
- to add the user- and group-id to this boot-code?
- to prevent or avoid /home/tc without backup and change of /etc/passwd and /etc/group?

thank you for sharing your knowledge and your help.
« Last Edit: April 27, 2016, 10:52:03 AM by netnomad »

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: group ids
« Reply #7 on: April 30, 2016, 10:53:11 AM »
I have in /etc/group on each boot -

jason:x:1000:

The usermod and groupmod commands can be imported to change user's user and group id.

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: group ids
« Reply #8 on: May 01, 2016, 06:59:03 AM »
hi jason,

i do not understand what you recommend...
i understand that with user- and groupmod i can change the ids.
but what leads every reboot the groupid 1000 to pulse-action,
i do not backup the config files passwd and group?
what risks appeare... what do you think happens, if i change the groupids at every reboot,
for pulse-action and my new user?

what do you recommend in detail?
what is your opinion about the questions and suggestions in my last post?

thank you for interest and your help.

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: group ids
« Reply #9 on: May 01, 2016, 03:11:29 PM »
Added the ability to specify by boot code user id with "uid=" followed by the number desired.  Otherwise defaults to 1000.  User tc only exists if tc is the main user, otherwise only the user specified by user= is added to the system. 

Are you able to perform the dCore importing and such commands with a different group id for the main user? 

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: group ids
« Reply #10 on: May 02, 2016, 06:59:00 AM »
hi jason,

your last cut offers great enhancements, thank you!
tc@box:~$ version -r
You are running dCore-jessie:2016.05.01.19.12, the latest release candidate.

after the boot process the autologin works fine in my setup.
if i exit to the prompt with exittc and exit the prompt at the command line,
it is not possible for me to login anymore, because there is no password set and no password saved in shadow.

this happens also with the standard user tc.

your solution with changing the uid of tc to 1000 makes everything much easier :-)
to get gid to 1000 i use following command in my bootlocal.sh
#sudo usermod -s /bin/bash -g 1000 tc
or
#sudo usermod -s /bin/bash -g 1000 user
do you recommend a better approach?

i still get two homedirectories tc and user... i guess this is caused by my backup...

i keep on testing...
would you be so kind and have a look for the passwordless login after leaving the prompt?

thank you for your great work :-)

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: group ids
« Reply #11 on: May 02, 2016, 09:41:06 AM »
I am not sure I understand what you mean by passwordless login, if you could explain with some detail that would help.

Also, it will be a simple change to use a gid= boot code available as an expert option for those who want a different user gid.  So are you able to import and load extensions with gid 1000? 

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: group ids
« Reply #12 on: May 02, 2016, 11:47:50 AM »
hi jason,

when i bootup my dcore-configuration, i do not need to use a password to login to my user account and my fluxbox-environment starts automatically.
when i leave fluxbox with the exittc-menue and i choose "exit to prompt",
i arrive at the prompt of the non-gui-environment.
if i type exit, then i log me out.
if i want to log-in again, i am asked for my user-name and a password that is not set.
so i am not able to log-in anymore...

these are my bootcodes:
waitusb=30:LABEL=tc
protect
restore=LABEL=tc
tce=LABEL=tc/tce
lst=sceboot.lst
vga=795
psmouse.proto=imps
settime
tz=CET-1CEST,M3.5.0,M10.5.0/3
laptop
kmap=de
multivt
lang=de_DE.UTF-8
mydata=dcore
blacklist=snd_usb_audio
intel_rng.no_fwh_detect=-1
printk.time=1
cron
desktop=fluxbox
log=3
acpi_sleep=s3_bios,s3_mode
showapps
nomd5
syslog
host=dcore
user=user
initrd=/live/dcore-current/boot/dCore-jessie.gz
BOOT_IMAGE=/live/dcore-current/boot/vmlinuz-jessie

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: group ids
« Reply #13 on: May 02, 2016, 12:06:46 PM »
hi jason,

everything works fine, except of my re-login without password and that bash is not loaded in my xterm.

this is my passwd:
user:x:1000:1000:Linux User,,,:/home/user:/bin/bash
nevertheless i have to manually start bash in my xterm.

thank you for every hint and help.

btw: the bootcode gid is a very good idea.
the bootcode could include uid:gid
f.e. user=user:user,1000:1000,/bin/bash or user=tc:staff,1000:50,/bb/ash
« Last Edit: May 02, 2016, 12:12:45 PM by netnomad »

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: group ids
« Reply #14 on: May 02, 2016, 12:36:14 PM »
hi jason,

the relogin with a password solves the bash problem.
so these two problems are connected.

do you see a solution to keep the former passwordless login?