Administrative Tasks Flashcards Preview

Linux+ (LXO-104) > Administrative Tasks > Flashcards

Flashcards in Administrative Tasks Deck (65):
1

Format of /etc/passwd entry

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

2

User IDs under _____ are reserved for system users

100

3

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

/bin/false

4

Normal user accounts have IDs from ___ to ____

500 to 1000

5

What should permissions be on /etc/passwd

644

6

What should permissions be on /etc/shadow

600

7

pwck

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

8

useradd -c

usually used to set user's full name

9

useradd -d

Used to set the user's home directory

10

useradd -e

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

11

useradd -p

Set your own encrypted password

12

useradd -M

Do not create the home directory

13

useradd -m

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

14

useradd -G

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

15

useradd -g

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

16

useradd -f INACTIVE

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.

17

useradd -k skel_dir

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

18

Location for default settings for the useradd command

/etc/default/useradd

19

chage

Used to change and manage users' expiry dates

20

chage -E

set the date that the user's password will expire

21

chage -I

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

22

chage -m

Set minimum number of days between password changes

23

chage -M

Set maximum number of days which a password is valid

24

groupdel

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

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