Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Unix/Linux で、特定のユーザーがどのグループに属しているかをコマンド ラインから調べるにはどうすればよいですか?
groups
また
groups user
これは、ユーザーの uid と、ユーザーが属するすべてのグループ (gid を含む) を示しています。
id userid
または、単に /etc/groups を調べてください (これは、ldap で pam を使用している場合はおそらく機能しません)