If not, how does android determine whether a user belongs to a certain group?
Android does not use the traditional /etc/passwd, however it still uses Linux User ID and Group ID for managing permissions.
A shadow password file, also known as /etc/shadow, is a system file in Linux that stores encrypted user passwords and is accessible only to the root user, preventing unauthorized users or malicious actors from breaking into the system.
/etc/passwd file aims at user account details while /etc/shadow aims at the user's password details. the passwd file is world-readable. shadow file can only be read by the root account. The user's encrypted password can only be stored in /etc/shadow file.
/etc/shadow is a text file that contains information about the system's users' passwords. It is owned by user root and group shadow, and has 640 permissions .
This thread discusses how that is done: http://groups.google.com/group/android-ndk/browse_thread/thread/adddb27c1a5438e9
It contains a broken link to a git repository though, you can find a list of name and IDs in https://android.googlesource.com/platform/system/core.git/+/master/include/private/android_filesystem_config.h.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With