Examining User Information Flashcards
The id command displays…?
user and group information.
The whoami reports the…?
current username.
The who, users, and w commands report …?
users with active sessions.
id -g, –group …?
Print only effective group id
id -G –groups ..?
Print all group ids
id -u, –user …?
Print only effective user id.
id -n, –name …?
Print user or group name instead of number.
If called without arguments, the id command returns…?
a summary of group memberships for the user who ran it. If supplied with a username, the id command reports group information for the specified user.
By default, ls reports the….?
user’s user id, primary group and primary group id, and all groups (primary and secondary) to which the user belongs, both by group name and group id.
The output of the id command can be qualified with…?
the command line switches.
The id command can report…?
one or more piece of information, starting with context=, known as the SELinux context.
SELinux, or “Security Enhanced Linux”, involves …?
topics which will be covered in more detail in later course, and for now can be safely ignored.
The whoami command simply…?
reports the current user’s username.
In Red Hat Enterprise Linux, there is seldom a need to use the whoami command, because…?
the default bash prompt displays the current user’s username. The prompt is configurable, however, and on other Linux or Unix systems, or in other environments (such as rescue shells), a user’s identity might not be as obvious. Also, the whoami command can be embedded in a script, which could take on different behavior depending on who’s running it.
Often, a user would like to know who else is using a particular Linux or Unix machine. Red Hat Enterprise Linux provides three commands which report current users, each at a different level of detail. THe simplest of these is the…?
users command.
The w command lists…?
current logged on users, but provides much more detailed information.
w command:
User…?
The username of the logged user
w command:
TTY…?
The terminal that the user logged in from. (Interpreting terminals is discussed in Workbook 1 (Quick Tour)).
w command:
FROM…?
If the user is logged in over the network, the host name that the user connected from.
w command:
LOGIN@…?
The time that the user started the session.
w command:
IDLE…?
How much time has expired since the terminal has seen interaction.
w command:
JCPU…?
The amount of CPU time consumed by all currently running processes associated with the terminal session.
w command:
PCPU…?
The amount of CPU time consumed by the only current process only, as named in the “WHAT” field.
w command:
WHAT…?
The user’s currently running process.
Who command provides…?
detailed information about who is currently logged on. Called without arguments, it behaves similarly to the w command. The who command is also designed to report system events, such as the current runlevel, system clock adjustments, and processes automatically spawned by the /sbin/init process.
The finger command can be used to..?
“check up” on a user, to see not only if that user is logged on, but if the have read their mail, what time they last logged in, and other information as well.
Without arguments, the finger command acts much like the who command, giving…?
information including a user’s terminal (Tty), login time, and idle time.
A user can customize the information someone sees when they are fingered, by…?
creating specially named hidden files in their home directory.
Files known by the finger command:
.plan…?
Displayed by the finger command, under the heading “Plan”
Files known by the finger command:
.project…?
Displayed by the finger command, under the heading “Project”
Files known by the finger command;
.pgpkey…?
Displayed by the finger command, under the heading “PGP Key” This is a convenient way for a user to publish the public key portion of a public/private key pair used in public key encryption.
My default in Red Hat Enterprise Linux, a user’s home directory is completely inaccessible to…?
other users on the system. In order for the finger command to find these files, a user must execute permissions on their home directory, using a command similar to the following: ( chmod o+x ~)
The finger command can report user activity on…?
remote machines, as well. For the command to work, the remote machine nimbus.example.com must elect to run the finger service. In the early days of the Internet, Unix machines commonly ran this service. Now that the Internet has grown, and the demands of security often outweigh the spirit of the community, most admin choose to not run the finger services.