You are not logged in.
Pages: 1
Hallo,
i'm not sure if that's the proper way to boot up the system but that's my current boot procedure:
That works properly so far. I can logout from XFCE and will be on vconsole. That's nice.
Now, when i add myself to a new group (usermod -aG audio myuser), log out from XFCE and on vconsole doing an 'exit' it quickly clears the screen, 'autologin' and 'autostartx' kick in again and i'm back in XFCE. That's ok but the user is not actively in the new group when spawning 'groups' command. Doing an 'id <user>' shows the group has been added successfully. Looks like the logout on vconsole wasn't "successful".
As a workaround i currently reboot the system but that's not very elegant. Why is logging out from vconsole not working anymore? How can i properly log out now to get things like this done?
sys2064
Offline
I'm not sure that I understand your problem but to add new users to a group straight away without logging out & back in again, use:
newgrp $GROUP
See newgrp(1)
Offline
Correct me if i'm wrong but 'newgrp' simply spawns a new login shell or something. That's not the same like a clean logout.
sys2064
Offline
0. You use the X autologin by identifying the TTY you're on, but you have to type exit on the TTY after exiting XFCE, without XFCE automatically coming up again? Somethings wrong.
1. If id shows the groups, then the groups work. It is entirely possible, that the groups command didn't entirely survive the ages and doesn't work as expected anymore. If id says you're fine and everything works, then groups is probably broken, as it is entirely possible, that nothing actually writes in /etc/group anymore (but maybe on boot, I have no clue).
2. Try restarting getty@tty1.service.
3. Try adding a group on TTY2, where no auto-login is present and logout/login from there. Check groups.
Offline
0. You use the X autologin by identifying the TTY you're on, but you have to type exit on the TTY after exiting XFCE, without XFCE automatically coming up again? Somethings wrong.
That's ok. I'm using 'startx' instead of 'exec startx'.
I've disabled 'Autostart X at login' now and can see that after an 'exit' it clearly says 'logged out' (in my language). New groups are effective as well (in vconsole) but not in X11. So this seems to only apply to X sessions and it childs.
I can login/logout at will (tty or x11). On vconsole new group is present, in x11 not. The x server maybe spawns from an old parent process that doesn't get killed by logging out the current user.
This is from 'root' account (vconsole). User 'maniaxx' is logged off but there are still processes running.
UID PID PPID C STIME TTY TIME CMD
maniaxx 344 1 0 18:11 ? 00:00:00 /usr/lib/systemd/systemd --user
maniaxx 346 344 0 18:11 ? 00:00:00 (sd-pam)
maniaxx 439 344 0 18:11 ? 00:00:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation
maniaxx 456 344 0 18:11 ? 00:00:00 /usr/lib/xfce4/xfconf/xfconfd
maniaxx 488 344 0 18:11 ? 00:00:00 /usr/lib/gvfs/gvfsd
maniaxx 499 344 0 18:11 ? 00:00:00 /usr/lib/gvfs/gvfsd-fuse /run/user/1000/gvfs -f -o big_writes
maniaxx 516 344 0 18:11 ? 00:00:00 /usr/lib/at-spi2-core/at-spi-bus-launcher
maniaxx 524 516 0 18:11 ? 00:00:00 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
maniaxx 564 344 0 18:11 ? 00:00:00 /usr/lib/gvfs/gvfs-udisks2-volume-monitor
maniaxx 586 344 0 18:11 ? 00:00:00 /usr/lib/gvfs/gvfsd-trash --spawner :1.15 /org/gtk/gvfs/exec_spaw/0
maniaxx 591 344 0 18:11 ? 00:00:00 /usr/lib/gvfs/gvfsd-metadata
maniaxx 818 344 0 18:14 ? 00:00:00 /usr/bin/lashd
maniaxx 831 344 0 18:14 ? 00:00:00 /usr/bin/jackdbus auto
maniaxx 920 344 0 18:15 ? 00:00:00 /usr/lib/GConf/gconfd-2
maniaxx 461 1 0 18:11 ? 00:00:00 /usr/bin/gpg-agent --sh --daemon --write-env-file /home/maniaxx/.cache/gpg-agent-info
Edit: Post cleaned.
Last edited by Maniaxx (2016-09-19 20:28:13)
sys2064
Offline
2. Try restarting getty@tty1.service.
What about this?
Offline
Doesn't change anything. But as you said it seems inconsistent indeed. The Jackserver does react to group change whereas shells/terminals spawned in X do not (at least 'groups'). So its not X in general.
I will try to kill all user processes on vconsole with root account. Lets see what happens.
Edit: 'systemd --user' process seems the culprit. In post #5 you can see most (remaining) processes are childs of it. If i stop it (sudo systemctl stop user-1000.slice) everything works properly (including 'groups' in X). I'm not sure if 'exit' is not the proper command to logout anymore (on systemd) or if that's even intended behavior. I will look up some options in '/etc/systemd/logind.conf' like 'KillUserProcesses='.
Last edited by Maniaxx (2016-09-19 20:40:54)
sys2064
Offline
Yes! That's it. Some user processes survive the login. I'd say the only reason this hasn't bugged more people already, is that adding and removing users isn't something many people do several times a day.
Offline
When setting 'KillUserProcesses=yes' in '/etc/systemd/logind.conf' all processes are killed indeed. Default setting is 'yes'. On Arch its 'No'. I'm wondering why it has been changed here.
KillUserProcesses=
Takes a boolean argument. Configures whether the processes of a user should be killed when the user logs out. If true, the scope unit corresponding to the session and all processes inside that scope will be terminated. If false, the scope is "abandoned", see systemd.scope(5), and processes are not killed. Defaults to "yes"
Last edited by Maniaxx (2016-09-19 23:57:15)
sys2064
Offline
Pages: 1