0

I am trying too do following command under entware-alternative:

#adduser hu
#addgroup jk
#usermod -aG jk hu    # add "hu" to group "jk"
#mkdir tf
#chmod 770 tf
#chgrp jk  tf
#su hu
$cd tf
$touch aaa

And it success.

My OS is Android, it doesn't have /etc/passwd and /etc/groups.

And it doesn't have pam_unix.so either.

Even though entware created /opt/etc/passwd and /opt/etc/groups. How linux know group "jk" has user "hu"?

How does linux know these information are stored in /opt/etc/passwd and /opt/etc/groups?

Bash and openssh-server can recognize my username correctly, I guess it were recompiled to read /opt/etc/passwd instead of /etc/passwd.

But file operation are managed by kernel I guess, how does kernel know this uid is under that gid?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.