Content #
Main job: to create cgroup slices and scopes for everyone who logs into a system.
- session A session gets created whenever a user logs into the system. Each session is assigned a decimal number as its ID.
- seat A seat consists of all of the hardware that is assigned to a specific workstation. Each seat has an assigned text-string name that consists of from 1 to 255 characters. A user who logs into a computer at the local console will always be assigned a seat. Users who log in remotely will not be assigned a seat. In a default setup, seat0 is the only seat that you will ever see. Creating new seats involves configuring udev rules.
loginctl #
loginctl user-status pogo
loginctl session-status 16
loginctl list-seats
loginctl seat-status seat0
loginctl terminate-session 10
polkit #
polkit comes pre-configured with a set of administrative tasks for which it can grant root privileges. You can add more tasks.
polkit.addAdminRule(function(action, subject) {
return ["unix-group:wheel"];
}
This means that if polkit detects someone trying to perform an administrative task without using sudo, it will look in the wheel group to see if anyone is there. If there is someone in the wheel group, then it will prompt the user to enter the password of that person. If the wheel group has no members, that means that the root user has an assigned password. If that’s the case, polkit will prompt for the root user password.
Links #
https://www.freedesktop.org/software/polkit/docs/latest/polkit.8.html