Tag Info

Hot answers tagged


You can use NFSv3 to map on user and group IDs. If you don't want to map on IDs use NFSv4 instead which maps on user- and groupnames. So if you have two different clients who have a user called user-host-a and user-host-b who both have UID 500 they both have access to the files when NFSv3 is used. When you have two different clients who have a user called ...


There is no record or log kept of which user was responsible for creating each user. Technically, all users are created by root anyway.


users counts login sessions. From sudo: The su command is used to become another user during a login session. (Emphasis is mine.) A login session creates a new tty, where as su uses the existing tty. I just looked at the source code to the users command. What it does is read utmp. So I guess the bottom line is that if you write a program and write ...


The rsync command doesn't have a mechanism for handling this directly, so I would use a different approach. I would scan the source filesystem tree, collecting the usernames (and groups) of all files present there: # List of usernames owning files under 'src' find src -printf "%u\n" | sort -u | tee /tmp/src.users # List of group memberships for files under ...


Very interesting attempt. Actually, process's supplementary groups (defined in /etc/group) are set by setgroups system call. It requires CAP_SETGID privilege or being root. So you can do like this: # id uid=0(root) gid=0(root) groups=0(root) # gdb -q id Reading symbols from id...(no debugging symbols found)...done. (gdb) b getgroups Breakpoint 1 at ...


Bash Reference Manual says: Bash attempts completion treating the text as username (if the text begins with ‘~’) Bash uses getpwent function for completion. man getpwent on OSX says: These functions obtain information from opendirectoryd(8), including records in /etc/master.passwd which is described in master.passwd(5).

Only top voted, non community-wiki answers of a minimum length are eligible