Administrative Tasks Flashcards

1
Q

Format of /etc/passwd entry

A

username:password:UID:Primary GUID:comment:homedir:default shell

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

User IDs under _____ are reserved for system users

A

100

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What can you change the shell section of an /etc/passwd entry to that will cause the user to not be able to login?

A

/bin/false

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Normal user accounts have IDs from ___ to ____

A

500 to 1000

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What should permissions be on /etc/passwd

A

644

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What should permissions be on /etc/shadow

A

600

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

pwck

A

Verifies the integrity of the users and authentication information by checking /etc/passwd and /etc/shadow

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

useradd -c

A

usually used to set user’s full name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

useradd -d

A

Used to set the user’s home directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

useradd -e

A

Set the user’s expiration date in the form YYYY-MM-DD

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

useradd -p

A

Set your own encrypted password

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

useradd -M

A

Do not create the home directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

useradd -m

A

Create the home directory /home/username if it does not exist

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

useradd -G

A

Defines all the other groups that the member belongs to. Separate each group by a comma .

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

useradd -g

A

Sets the default group that is the users group when the user first logs in

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

useradd -f INACTIVE

A

defines the number of days after a password expires that an account is permanently disabled. Value of 0 disables immediately after the password expires and -1 disables the entire inactive feature.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

useradd -k skel_dir

A

Use skel_dir as the skeleton directory instead of /etc/skel

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Location for default settings for the useradd command

A

/etc/default/useradd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

chage

A

Used to change and manage users’ expiry dates

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

chage -E

A

set the date that the user’s password will expire

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

chage -I

A

Set the number of days of inactivity after a password expired before locking the account

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

chage -m

A

Set minimum number of days between password changes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

chage -M

A

Set maximum number of days which a password is valid

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

groupdel

A

Used to delete a group (cannot do this if any user has the group as their primary group)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
groupmod -g
Specify a new group id
26
groupmod -o
When used with -g it allows two groups to share the same group id
27
groupmod -n
Specify a new group name
28
userdel -f
Force the deletion of the user even if they are logged in. | Will also delete home directory and mail
29
userdel -r
Will remove the home directory and mail. | Note: does not remove all other files owned by the user outside of their home directory
30
usermod -d
Set the user's home directory
31
usermod -e
Set the date on which the account will expire
32
usermod -f
Number of days after a password expires until account is permanently disabled
33
usermod -g
default login group
34
usermod -G
List of extra groups a user is part of
35
usermod -l
Change the login name of the user
36
usermod -L
Lock the account
37
/etc/group
File containing list of groups and all the members associated with the group
38
groupadd -g
Specify a group id
39
groupadd -r
Chooses a group id less than 500 used for system groups
40
groupadd -f
Forces group creation even if there is already a group by that name
41
passwd -x
Specify number of days a password must remain valid
42
passwd -n
Minimum number of days between password changes
43
passwd -i
Make account inactive after password has been expired for some number of days
44
echo $$
Display current shell process
45
echo $?
Display exit value of the last command
46
echo $!
Display the PID of the last job run in background
47
echo $0
Display the name of the shell or script
48
Location that crontabs are stored for users
/var/spool/cron/*
49
atq
List pending AT jobs
50
File in which you list users that you want to deny use of at
/etc/at.deny
51
File in which you list users that you want to specifically allow use of at
/etc/at.allow
52
File in which you list users that you want to deny use of cron
/etc/cron.deny
53
File in which you list users that you want to allow use of cron
/etc/cron.allow
54
atrm jobnum
Will remove the at task with the specified jobnum
55
at
Program that causes commands specified to be executed once at a specified later time. End things with ctrl + d
56
at now + 1 minute
Will perform the specified commands 1 minute from now
57
Cron Format
minute hour day month day-of-week command
58
What do locale settings determine?
Language, country, currency symbols, etc.
59
Language environment variable
LANG
60
Are timezone settings part of locale settings?
no!
61
Location of the time zone file
/etc/timezone
62
How to set the correct timezone?
ln –s some timezone file from /usr/share/zoneinfo to /etc/timezone or copy the correct zone file from /usr/share/zoneinfo and replace /etc/timezone
63
tzconfig
GUI tool to help make time zone changes
64
iconv
Utility used to convert between character sets
65
Unicode
Character set designed to support as many languages as possible