Topic 16 – Users and security Flashcards

1
Q

within linux where were passwords historically stored

A

Historically these were saved in the /etc/passwd file but this now only contains each user and metadata for each user

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

what does the salt value added to a password offer resistance to

A

this offers resistance to dictionary and rainbow attacks

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

how does linux determine which file permissions to use and what 3 scenarios are spawned from this

A

to achieve this linux uses the user id (UID) and group id (GID) of the current process and the file

from here:

  1. If the User ID(UID) of the current process matches the User ID(UID) of the file (the owner of the file) then the user permissions are used
  2. If the Group ID(GID) of the current process matches the Group ID(GID) of the file (the group owner of the file) then the group permissions are used
  3. If the User ID(UID) of the current process and the Group ID(GID) of the current process failed to match the file then the other user permissions are used
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

this linux command is used to administer /etc/group and /etc/gshadow such as adding and deleting members

A

describe the linux command

Gpasswd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
  • these offer fine grained control for applying permissions
  • This sytem is used by network devices such as firewalls and in operating systems such as windows.
  • Typically this will follow an allow and deny implementation for permissions
A

describe briefly

Access control lists (ACL)

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

what tasks can super users carry out that normal users cant

A

this type of user can:

Create change or delete hardware and system files

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

describe the first 2 columns of the /etc/shadow file and subsequent columns

A

The columns for this file are as follows:

  1. First column is the username
  2. Second column is the hashed password
  3. Subsequent fields display password set times and password expiry times
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

this is a linux command used to delete a user or group from the system

A

describe the linux command

Deluser

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

what is the

default behaviour of deluser

A

By default this linux command only deletes the user account and does not remove the home directory or mail spool

to remove the home directory and mail spool include the option

–remove-home

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

this is represented as:

note

some linux commands allow the numeric expression to be entered as the permissions

A

describe the binary represenation of the linux permissions

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

this will set permissions on newfile1 as:

  1. User has read,write,execute
  2. Group has read,write
  3. Other users have read
A

describe the execution of the linux command

chmod u=rwx,g=rw,o=r newfile1

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

this is the basic syntax for adding a new user

A

describe the command

Sudo adduser user

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

these include:

  1. the user [u] (you, the owner of the file)
  2. the group [g] that the file belongs to
  3. any other users [o]
A

within linux what are the 3

types of users that can have permisions granted to them

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

this column is subdivided into three distinct parts which are separated by a $

  1. $method - this will hold a number that represents the cryptographic method such as 6 corresponds to SHA-512 (Secure Hash Algorithm with 512-bit block,
  2. $salt - this holds the salt value generated by the OS on the password creation it will be added to the password before encryption
  3. $hash - this is the hashed password with salt hash value
A

describe the

second column of the /etc/shadow file

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

this is a linux file that holds all the groups on the system

A

describe the linux file

/etc/group

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

this is the basic syntax to add a new group in linux

A

describe the command

sudo addgroup group

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

this linux command is used to add new users and groups

A

describe the linux command

Adduser

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

name 5 properties of a hash function

A

these include:

  1. the same input always gives the same output
  2. a small change in input gives a large change in output
  3. the output doesn’t depend on the length of the input
  4. the chance of two different inputs giving the same output is extremely small
  5. the transformation is one-way.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

this is a file that has passwords and the hash value already calculated

A

describe briefly a dictionary attack

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

describe the linux command

Addgroup

A

this is a linux command that is used to add groups to the system

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

describe the execution of the linux command

chmod u=rwx,g=rw,o=r newfile1

A

this will set permissions on newfile1 as:

  1. User has read,write,execute
  2. Group has read,write
  3. Other users have read
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

the actions it takes include:

  1. Adds the user to the system
  2. Adds a group of the same name to the system
  3. The user and group are then associated
  4. A home directory is created for the user in /home
  5. Default files are copied from the /etc/skel directory to /home/user
  6. Password configuration is asked for
  7. Metadata is asked for such as full name, mobile number
A

what are the 7

actions that adduser takes upon execution

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

within linux what are the 3

types of users that can have permisions granted to them

A

these include:

  1. the user [u] (you, the owner of the file)
  2. the group [g] that the file belongs to
  3. any other users [o]
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

this linux command will delete ali from the students group

A

what is the outcome of executing the following linux command

sudo gpasswd -d ali students

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

generates all possible combinations of letters, digits and symbols up to some length

A

describe briefly a

rainbow attack

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

what benefits are there from being a member of the

sudo group

A

being a member of this group allows a user to use the sudo command and temporarily take on the role of the root user

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

the reason for this is that:

this file must be publicly readable for command such as ls which need to read this file in order to translate a UID to a human readable format such as ali

A

why must the

/etc/passwd

be publically readable

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

this will add the execute permission to the granted permissions for the user, group and other users

A

describe the output of the following linux command

chmod ugo+x newfile1

or

chmod a+x newfile1

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

describe briefly

Access control lists (ACL)

A
  • these offer fine grained control for applying permissions
  • This sytem is used by network devices such as firewalls and in operating systems such as windows.
  • Typically this will follow an allow and deny implementation for permissions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

describe the linux file

/etc/group

A

this is a linux file that holds all the groups on the system

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

how may owners may a linux file have

A

this may have:

  • one user owner
  • one group owner

note

this limited implementation can can cause problems when multiple groups for example need access to the file

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

The columns for this file are as follows:

  1. First column is the username
  2. Second column is the hashed password
  3. Subsequent fields display password set times and password expiry times
A

describe the first 2 columns of the /etc/shadow file and subsequent columns

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

what are the 7

actions that adduser takes upon execution

A

the actions it takes include:

  1. Adds the user to the system
  2. Adds a group of the same name to the system
  3. The user and group are then associated
  4. A home directory is created for the user in /home
  5. Default files are copied from the /etc/skel directory to /home/user
  6. Password configuration is asked for
  7. Metadata is asked for such as full name, mobile number
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

these include:

  1. the same input always gives the same output
  2. a small change in input gives a large change in output
  3. the output doesn’t depend on the length of the input
  4. the chance of two different inputs giving the same output is extremely small
  5. the transformation is one-way.
A

name 5 properties of a hash function

35
Q

describe the linux command

Chmod

A

also known a change mode where mode refers to permissions

is a linux command for controlling permissions

36
Q

describe the linux command

Gpasswd

A

this linux command is used to administer /etc/group and /etc/gshadow such as adding and deleting members

37
Q

also known a change mode where mode refers to permissions

is a linux command for controlling permissions

A

describe the linux command

Chmod

38
Q

this could include:

    • (for a file)
  1. d (for a directory)
  2. l (for a link)
  3. b (for a block device)
  4. C (for a character device)
A

what are 5 characters that could be held as the

first character from the output of ls -l

39
Q

this is the basic syntax for modifying permissions.

A

describe the following linux command

chmod [ugoa][-+=][rwx]

40
Q

this will print the name of the user that is currently in control

A

describe the linux command

Whoami

41
Q

name 2 advantages of

separating super user and normal user

A

the advantages of this are:

  • Safegaurding the user - separating the superusers and normal user offers a safe guard for the user in that system changing commands cannot be accidentally executed
  • Malware protection - if the normal user only uses there normal account then malware cannot gain full access to the system by simply gaining access to this account
42
Q

this is a linux command that is used to add groups to the system

A

describe the linux command

Addgroup

43
Q

what is the outcome of executing the following linux command

sudo gpasswd -d ali students

A

this linux command will delete ali from the students group

44
Q

describe the linux directory

/etc/skel

A

this is a linux directory that can hold a skeleton contents of a new users home directory.

Adduser copies the contents of this directory into the users home directory upon creation

45
Q

these are now stored inside the /etc/shadow file and is read/write only for the root user

note

the /etc/passwd file now has a placeholder where this used to be stored

the placeholder could be ‘x’ which represents that it is being held somewhere in an encrypted form

A

where are

linux passwords now stored

46
Q

within linux this is the basic syntax that will delete a group

A

describe the command

Delgroup group

47
Q

describe the linux directory

/etc/passwd

A

this is a linux file that contains essential information about all user accounts on the system

48
Q

describe how the following syntax is used

chmod [ugoa][-+=][rwx]

A

from this:

[ugoa] - one character may be chosen from this group a=ugo

[-+=] - one character may be chosen from this group = will set permissions regardless of what they were previously

[rwx] - any combination of characters may be chosen from this group if a character is ommitted then the permission is not granted

49
Q

describe the following linux command

chmod [ugoa][-+=][rwx]

A

this is the basic syntax for modifying permissions.

50
Q

describe the linux command

Deluser

A

this is a linux command used to delete a user or group from the system

51
Q

this type of user can:

Create change or delete hardware and system files

A

what tasks can super users carry out that normal users cant

52
Q

to achieve this linux uses the user id (UID) and group id (GID) of the current process and the file

from here:

  1. If the User ID(UID) of the current process matches the User ID(UID) of the file (the owner of the file) then the user permissions are used
  2. If the Group ID(GID) of the current process matches the Group ID(GID) of the file (the group owner of the file) then the group permissions are used
  3. If the User ID(UID) of the current process and the Group ID(GID) of the current process failed to match the file then the other user permissions are used
A

how does linux determine which file permissions to use and what 3 scenarios are spawned from this

53
Q

describe briefly a

rainbow attack

A

generates all possible combinations of letters, digits and symbols up to some length

54
Q

describe the command

Sudo adduser user

A

this is the basic syntax for adding a new user

55
Q

these include:

  1. Username: This field stores the usernames which are used while login into the system. The length of this field is between 1 and 32 characters.
  2. Password: This field store the password of the user. The x character indicates the password is stored in /etc/shadow file in the encrypted format. We can use the passwd command to update this field.
  3. User ID(UID): User identifier is the number assigned to each user by the operating system to refer the users. The 0 UID is reserved for the root user. And 1-99 UID are reserved for other predefined accounts. And 100-999 are reserved by the system for administrative and system accounts/groups.
  4. Group ID(GID): Group identifier is the number indicating the primary group of users. Most of the time it is the same as the UID.
  5. User ID Info (GECOS): This is a comment field. This field contains information like the user phone number, address, or full name of the user. This field is used by the finger command to get information about the user.
  6. Home directory: This field contains the absolute path of the user’s home directory. By default, the users are created under the /home directory. If this file is empty, then the home directory of that user will be /
  7. Login shell: This field store the absolute path of the user shell. This shell is started when the user is log in to the system.
A

describe the

7 columns of the /etc/passwd file

56
Q

what are 5 characters that could be held as the

first character from the output of ls -l

A

this could include:

    • (for a file)
  1. d (for a directory)
  2. l (for a link)
  3. b (for a block device)
  4. C (for a character device)
57
Q

describe the binary represenation of the linux permissions

A

this is represented as:

note

some linux commands allow the numeric expression to be entered as the permissions

58
Q

these include:

  1. Read [r] (from the file)
  2. Write [w] (to the file)
  3. Execute [x] (run the file)
A

within linux what are the

three types of permissions that may be granted to a type of user

59
Q

this is a linux file that contains essential information about all user accounts on the system

A

describe the linux directory

/etc/passwd

60
Q

the advantages of this are:

  • Safegaurding the user - separating the superusers and normal user offers a safe guard for the user in that system changing commands cannot be accidentally executed
  • Malware protection - if the normal user only uses there normal account then malware cannot gain full access to the system by simply gaining access to this account
A

name 2 advantages of

separating super user and normal user

61
Q

describe briefly a dictionary attack

A

this is a file that has passwords and the hash value already calculated

62
Q

this is interpreted as:

  1. First set of three characters (2 - 4) - are the permissions given to the user
  2. Second set of three characters (5 - 7) - are the permissions granted to the group
  3. Third set of three characters (8 - 10) - are the permissions granted to any other users
A

from the

output of ls -l what do the characters 2 - 10 represent

63
Q

describe how the permissions

read,write and execute affect directories

A

this is affected as follows:

  • Read - allows you to list the directory contents (ls)
  • Write - allows you to create and delete content within the directory
  • Execute - allows you to access the directory (cd)
64
Q

describe the

second column of the /etc/shadow file

A

this column is subdivided into three distinct parts which are separated by a $

  1. $method - this will hold a number that represents the cryptographic method such as 6 corresponds to SHA-512 (Secure Hash Algorithm with 512-bit block,
  2. $salt - this holds the salt value generated by the OS on the password creation it will be added to the password before encryption
  3. $hash - this is the hashed password with salt hash value
65
Q

where are

linux passwords now stored

A

these are now stored inside the /etc/shadow file and is read/write only for the root user

note

the /etc/passwd file now has a placeholder where this used to be stored

the placeholder could be ‘x’ which represents that it is being held somewhere in an encrypted form

66
Q

describe the

7 columns of the /etc/passwd file

A

these include:

  1. Username: This field stores the usernames which are used while login into the system. The length of this field is between 1 and 32 characters.
  2. Password: This field store the password of the user. The x character indicates the password is stored in /etc/shadow file in the encrypted format. We can use the passwd command to update this field.
  3. User ID(UID): User identifier is the number assigned to each user by the operating system to refer the users. The 0 UID is reserved for the root user. And 1-99 UID are reserved for other predefined accounts. And 100-999 are reserved by the system for administrative and system accounts/groups.
  4. Group ID(GID): Group identifier is the number indicating the primary group of users. Most of the time it is the same as the UID.
  5. User ID Info (GECOS): This is a comment field. This field contains information like the user phone number, address, or full name of the user. This field is used by the finger command to get information about the user.
  6. Home directory: This field contains the absolute path of the user’s home directory. By default, the users are created under the /home directory. If this file is empty, then the home directory of that user will be /
  7. Login shell: This field store the absolute path of the user shell. This shell is started when the user is log in to the system.
67
Q

describe the linux command

Adduser

A

this linux command is used to add new users and groups

68
Q

what is the outcome of executing the following linux command

sudo gpasswd -a ali students

A

this linux command will add ali to the students group

69
Q

By default this linux command only deletes the user account and does not remove the home directory or mail spool

to remove the home directory and mail spool include the option

–remove-home

A

what is the

default behaviour of deluser

70
Q

describe the linux command

Whoami

A

this will print the name of the user that is currently in control

71
Q

describe the command

sudo addgroup group

A

this is the basic syntax to add a new group in linux

72
Q

this linux command will add ali to the students group

A

what is the outcome of executing the following linux command

sudo gpasswd -a ali students

73
Q

describe the output of the following linux command

chmod ugo+x newfile1

or

chmod a+x newfile1

A

this will add the execute permission to the granted permissions for the user, group and other users

74
Q

Historically these were saved in the /etc/passwd file but this now only contains each user and metadata for each user

A

within linux where were passwords historically stored

75
Q

describe the command

Delgroup group

A

within linux this is the basic syntax that will delete a group

76
Q

being a member of this group allows a user to use the sudo command and temporarily take on the role of the root user

A

what benefits are there from being a member of the

sudo group

77
Q

from the

output of ls -l what do the characters 2 - 10 represent

A

this is interpreted as:

  1. First set of three characters (2 - 4) - are the permissions given to the user
  2. Second set of three characters (5 - 7) - are the permissions granted to the group
  3. Third set of three characters (8 - 10) - are the permissions granted to any other users
78
Q

why must the

/etc/passwd

be publically readable

A

the reason for this is that:

this file must be publicly readable for command such as ls which need to read this file in order to translate a UID to a human readable format such as ali

79
Q

from this:

[ugoa] - one character may be chosen from this group a=ugo

[-+=] - one character may be chosen from this group = will set permissions regardless of what they were previously

[rwx] - any combination of characters may be chosen from this group if a character is ommitted then the permission is not granted

A

describe how the following syntax is used

chmod [ugoa][-+=][rwx]

80
Q

within linux what are the

three types of permissions that may be granted to a type of user

A

these include:

  1. Read [r] (from the file)
  2. Write [w] (to the file)
  3. Execute [x] (run the file)
81
Q

this is affected as follows:

  • Read - allows you to list the directory contents (ls)
  • Write - allows you to create and delete content within the directory
  • Execute - allows you to access the directory (cd)
A

describe how the permissions

read,write and execute affect directories

82
Q

this offers resistance to dictionary and rainbow attacks

A

what does the salt value added to a password offer resistance to

83
Q

this may have:

  • one user owner
  • one group owner

note

this limited implementation can can cause problems when multiple groups for example need access to the file

A

how may owners may a linux file have

84
Q

this is a linux directory that can hold a skeleton contents of a new users home directory.

Adduser copies the contents of this directory into the users home directory upon creation

A

describe the linux directory

/etc/skel