OS内部でのユーザ識別について。


test-san:x:500:500::/home/test:/bin/bash
test-kun:x:500:500::/home/test:/bin/bash
こういうユーザが

wheel:x:10:root,test-san
test:x:500:
こんな風にグループ設定されてて

-rwsr-x--- 1 root wheel 19116 Sep 21 15:35 /home/test/su
こういうコマンドを実行するとき、test-kun はこのコマンドを実行できない。
当然と言えば当然なのだけども、uid で区別してるんじゃなくて、名前で区別してる。
whoami コマンドは、uid で区別して動作するから、どっちのユーザが実行しても test-san って返されるけどな。