12/24/2023 0 Comments 2 users in same gid linuxthere was no adduser command, no addgroup, the files were edited by root using vi or ed. Originally there was only the passwd and group files, and they served their purpose. So it has never been changed, and I don't think it ever will. If this changed, then it would break those systems where admins have had a use for this feature, (see Terdon's example). The reason that this is allowed today, is simply because the system doesn't prevent it. Notice the Uid: and Gid:, the numbers are what's actually written to the disk! Remember that your files are written to the disk using UID/GID's not actual names. Files such as /etc/passwd and /etc/group are really meant to provide a human readable name when your system is listing files from disks. The role of tracking username's and passwords is the responsibility of the /etc/shadow file. The role of the /etc/passwd file is NOT meant to solely track user accounts. Saml:x:1000:1000:saml:/home/saml:/bin/bashĪ common attack vector on Unix type systems is to add lines such as these to a system's /etc/passwd file: $ getent passwd r00t The other intended purpose of this file is to specify what shell a user will get when they login. The intent of this file is to associate a UID with a physical name that can be display by command line tools such as ls when user's are listing out files. Unix systems & Linux generally do nothing to prohibit duplicates in the /etc/passwd file.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |