Sec. 30 User Account Management Flashcards
What is the user name
The unique name assigned to each user
User password
The password assigned to each user
User identification number(uid)
A unique number adorn to a user account.
Group identification number (gid)
Indicates the primary, principal, or default group of the user
What is the login shell
This shell is a program such as /bin/bash or bin/csh
What utility would I use to create a user account?
useradd
What utility t Gould I use to remove a user account?
userdel
Name the utility that would allow me to change characteristics of an user account?
usermod
Name the utility that would put an expiration date on a user’s password?
chage
What utility allows me to change user passwords
passwd
What is the format of chage?
chage [-m mindays] [-M maxdays] [-d lastday] [-I inactive] [-E expiredate] [- W warndays] user
what does usermod -L do ?
lock the users account/password
what does usermod -l NEW_LOGIN do?
the names of the user will be changed form login to NEW_LOGIN
what does usermod -s SHELL do ?
the names of the user’s new login shell .
what does the usermod -U do ?
unlocks the users password
What is the format for the utility useradd ?
useradd [options] LOGIN
what does useradd -c do?
allows comments to be added to the user information. Usually the users full name
what does useradd -e EXPIRE_DATE do ?
it sets a date on which the account will be disabled
how would I execute a command to force the user to change their password the next time they login?
$ sudo chage -d 0 USERNAME
how would I invoke a restricted shell ?
bash -r
What are some restrictions that a restricted shell enforce?
- prevents user from changing directories 2. redirecting input and output
what is ssh?
stands for secure shell , allows an admin to login through the network into a remote system.
what does the command whoami do ?
returns the user name of the owner of the current login session.
what command copies files between hosts on a network?
scp
what is the for command ?
is a looping command.
user-specifc configuration files are created under every user’s home directory n the hidden what?
.ssh directory
what command would show me the hidden .ssh directory ?
ls -la ~/.ssh
what doe the file id_rsa contain?
the user’s private encryption key
what does the file id_rsa.pub contain ?
the user’s public encryption key
what file contains a list of public keys that are permitted to login?
authorized_keys
what file has a list of hosts from which logins have been allowed in the past?
known_hosts
what does the config file contain?
a configuration file for specifying various options
what command will generate a user’s private and public encryption keys ?
ssh-keygen
the public key can be given to any machine with which you want to permit what?
password-less access
If I were to invoke the following : $ sudo useradd dexter what UID would he receive?
the next available UID greater than UID_MIN ( specified in /etc/login.defs) by defuat is assigned to dexter.
If I were to invoke $ sudo useradd dexter what would be his first group ID?
A group called dexter with a GID=UID is also created and assigned as dexter’s primary group.
If I were to invoke $ sudo useradd dexter what home directory would dexter receive?
a home directory /home/dexter is created and owned by dexter.
if the symbol !! or ! is placed in the password field of the /etc/shadow file for an user’s entry what would that indicate?
that the admin needs to assign the user a password for the account to be usable.
If I were to invoke $ sudo userdel morgan what would happen to the home directory?
even though the account would be deleted. the home directory of the user would not be deleted.
what option would I need to give to the command userdel to have the user’s home directory deleted as well?
-r
what can I use the command usermod for?
the command usermod can be used to change chararcteristics of the user account, such as group memberships**, **home directory,** **login name**, **password**, **default shell**, **user id** ,**etc…
what would be the result of the following command?
sudo usermod -L dexter
dexter would be locked out of his account.
if I would like to delete a user’s account what command would i use?
userdel
in the file /etc/password contains how many lines for each user?
one
each item associated to an user in /etc/password is seperated by what?
:
semicolon