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
Q

groupmod -g

A

Specify a new group id

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

groupmod -o

A

When used with -g it allows two groups to share the same group id

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

groupmod -n

A

Specify a new group name

28
Q

userdel -f

A

Force the deletion of the user even if they are logged in.

Will also delete home directory and mail

29
Q

userdel -r

A

Will remove the home directory and mail.

Note: does not remove all other files owned by the user outside of their home directory

30
Q

usermod -d

A

Set the user’s home directory

31
Q

usermod -e

A

Set the date on which the account will expire

32
Q

usermod -f

A

Number of days after a password expires until account is permanently disabled

33
Q

usermod -g

A

default login group

34
Q

usermod -G

A

List of extra groups a user is part of

35
Q

usermod -l

A

Change the login name of the user

36
Q

usermod -L

A

Lock the account

37
Q

/etc/group

A

File containing list of groups and all the members associated with the group

38
Q

groupadd -g

A

Specify a group id

39
Q

groupadd -r

A

Chooses a group id less than 500 used for system groups

40
Q

groupadd -f

A

Forces group creation even if there is already a group by that name

41
Q

passwd -x

A

Specify number of days a password must remain valid

42
Q

passwd -n

A

Minimum number of days between password changes

43
Q

passwd -i

A

Make account inactive after password has been expired for some number of days

44
Q

echo $$

A

Display current shell process

45
Q

echo $?

A

Display exit value of the last command

46
Q

echo $!

A

Display the PID of the last job run in background

47
Q

echo $0

A

Display the name of the shell or script

48
Q

Location that crontabs are stored for users

A

/var/spool/cron/*

49
Q

atq

A

List pending AT jobs

50
Q

File in which you list users that you want to deny use of at

A

/etc/at.deny

51
Q

File in which you list users that you want to specifically allow use of at

A

/etc/at.allow

52
Q

File in which you list users that you want to deny use of cron

A

/etc/cron.deny

53
Q

File in which you list users that you want to allow use of cron

A

/etc/cron.allow

54
Q

atrm jobnum

A

Will remove the at task with the specified jobnum

55
Q

at

A

Program that causes commands specified to be executed once at a specified later time.
End things with ctrl + d

56
Q

at now + 1 minute

A

Will perform the specified commands 1 minute from now

57
Q

Cron Format

A

minute hour day month day-of-week command

58
Q

What do locale settings determine?

A

Language, country, currency symbols, etc.

59
Q

Language environment variable

A

LANG

60
Q

Are timezone settings part of locale settings?

A

no!

61
Q

Location of the time zone file

A

/etc/timezone

62
Q

How to set the correct timezone?

A

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
Q

tzconfig

A

GUI tool to help make time zone changes

64
Q

iconv

A

Utility used to convert between character sets

65
Q

Unicode

A

Character set designed to support as many languages as possible