-
Notifications
You must be signed in to change notification settings - Fork 328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
id command expects id to have names but that's optional #117
Comments
Is there an easy way to reproduce this from the shell, or do I need to a C program that calls setgroups(2)? |
On QNX we have a utility that can do that easily and I found that you can have something similar to this tool in this repo |
sudo has -u and -g options. |
Ah, but I see it won't let even root select nonexisting ones. (That's why I had a todo item to add -u UID and -g GID[,...] to su, which I haven't done yet because I need to figure out what the -s and -c backwards compatibility stuff looks like with the "add arbitrary arguments to the end of the command line". I think it means when you do -u or -g the first argument isn't treated as a username, and when you add arguments it doesn't do -s unless you specify -s or -c...) |
The id command expects all given uids, gids and sgids to exist in textual form but I don't think this is required at all by the specs and limits the usefulness of the command.
See http://pubs.opengroup.org/onlinepubs/009695399/utilities/id.html
"If any of the user ID, group ID, effective user ID, effective group ID, or supplementary/multiple group IDs cannot be mapped by the system into printable user or group names, the corresponding "(%s)" and name argument shall be omitted from the corresponding format string."
The text was updated successfully, but these errors were encountered: