4
Login information is tied to UIDs in Linux. However, when I open the sudoers file the sudoers are defined by username instead of UID.
Why are used usernames instead of UID?
Does the sudoers file automatically change when usermod -l
is run?
Snippet:
# User privilege specification
root ALL=(ALL:ALL) ALL
You can insert comments by prefixing them with a # but this is also used to specify a uid in certain parts of the file when it is followed by a number see here for example – Hastur – 2015-10-14T20:07:00.167
@Hastur Okay so it's possible to refer to uid's by prefixing them with a #. Why isn't this done by default? i.e.:
#0 ALL=(ALL:ALL) ALL
instead of
root ALL=(ALL:ALL) ALL
It's kinda strange to tie these security rules to a specific username or groupname since they can be changed. User ID's and Group ID's cannot be changed. – Flightkick – 2015-10-15T08:32:35.743
You can change UID and GUID, starting from the
etc/passwd
(etc etc) and doingchown -R newUID:newGUID
with some additional care... BTW The idea is to create alias for sudo groups, for group of group, and so on ... so the UID should became quickly a mess to administrate... but the definitive answer I suppose you can have only from the one who did it and still is improving it and working on... (Todd) – Hastur – 2015-10-15T10:24:41.647