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
generates all possible combinations of letters, digits and symbols up to some length
describe briefly a ## Footnote **rainbow attack**
26
what benefits are there from being a member of the ## Footnote **sudo group**
being a member of this group allows a user to use the sudo command and temporarily take on the role of the root user
27
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
why must the **/etc/passwd** be publically readable
28
this will add the execute permission to the granted permissions for the user, group and other users
describe the output of the following linux command **chmod ugo+x** *newfile1* or **chmod a+x** *newfile1*
29
describe briefly ## Footnote **Access control lists (ACL)**
* 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
30
describe the linux file ## Footnote **/etc/group**
this is a linux file that holds all the groups on the system
31
how may owners may a linux file have
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
32
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
describe the first 2 columns of the /etc/shadow file and subsequent columns
33
what are the 7 actions that **adduser** takes upon execution
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
34
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.
name 5 properties of a hash function
35
describe the linux command ## Footnote **Chmod**
also known a change mode where mode refers to permissions is a linux command for controlling permissions
36
describe the linux command ## Footnote **Gpasswd**
this linux command is used to administer /etc/group and /etc/gshadow such as adding and deleting members
37
also known a change mode where mode refers to permissions is a linux command for controlling permissions
describe the linux command ## Footnote **Chmod**
38
this could include: 1. - (for a file) 2. d (for a directory) 3. l (for a link) 4. b (for a block device) 5. C (for a character device)
what are 5 characters that could be held as the ## Footnote **first character from the output of ls -l**
39
this is the basic syntax for modifying permissions.
describe the following linux command chmod [ugoa][-+=][rwx]
40
this will print the name of the user that is currently in control
describe the linux command ## Footnote **Whoami**
41
name 2 advantages of ## Footnote **separating super user and normal user**
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
this is a linux command that is used to add groups to the system
describe the linux command ## Footnote **Addgroup**
43
what is the outcome of executing the following linux command **sudo gpasswd -d** *ali students*
this linux command will delete ali from the students group
44
describe the linux directory ## Footnote **/etc/skel**
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
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
where are ## Footnote **linux passwords now stored**
46
within linux this is the basic syntax that will delete a group
describe the command **Delgroup** *group*
47
describe the linux directory ## Footnote **/etc/passwd**
this is a linux file that contains essential information about all user accounts on the system
48
describe how the following syntax is used chmod [ugoa][-+=][rwx]
from this: ## Footnote [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
describe the following linux command chmod [ugoa][-+=][rwx]
this is the basic syntax for modifying permissions.
50
describe the linux command ## Footnote **Deluser**
this is a linux command used to delete a user or group from the system
51
this type of user can: Create change or delete hardware and system files
what tasks can super users carry out that normal users cant
52
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 does linux determine which file permissions to use and what 3 scenarios are spawned from this
53
describe briefly a ## Footnote **rainbow attack**
generates all possible combinations of letters, digits and symbols up to some length
54
describe the command **Sudo adduser** *user*
this is the basic syntax for adding a new user
55
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](https://www.geeksforgeeks.org/finger-command-in-linux-with-examples/) 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.
describe the ## Footnote **7 columns of the /etc/passwd file**
56
what are 5 characters that could be held as the ## Footnote **first character from the output of ls -l**
this could include: 1. - (for a file) 2. d (for a directory) 3. l (for a link) 4. b (for a block device) 5. C (for a character device)
57
describe the binary represenation of the linux permissions
this is represented as: _note_ some linux commands allow the numeric expression to be entered as the permissions
58
these include: 1. Read [r] (from the file) 2. Write [w] (to the file) 3. Execute [x] (run the file)
within linux what are the **three types of permissions that may be granted to a type of user**
59
this is a linux file that contains essential information about all user accounts on the system
describe the linux directory ## Footnote **/etc/passwd**
60
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
name 2 advantages of ## Footnote **separating super user and normal user**
61
describe briefly a dictionary attack
this is a file that has passwords and the hash value already calculated
62
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
from the ## Footnote **output of ls -l what do the characters 2 - 10 represent**
63
describe how the permissions read,write and execute affect directories
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
describe the ## Footnote **second column of the /etc/shadow file**
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
where are ## Footnote **linux passwords now stored**
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
describe the ## Footnote **7 columns of the /etc/passwd file**
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](https://www.geeksforgeeks.org/finger-command-in-linux-with-examples/) 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
describe the linux command ## Footnote **Adduser**
this linux command is used to add new users and groups
68
what is the outcome of executing the following linux command **sudo gpasswd -a** *ali students*
this linux command will add ali to the students group
69
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
what is the ## Footnote **default behaviour of deluser**
70
describe the linux command ## Footnote **Whoami**
this will print the name of the user that is currently in control
71
describe the command **sudo addgroup** *group*
this is the basic syntax to add a new group in linux
72
this linux command will add ali to the students group
what is the outcome of executing the following linux command **sudo gpasswd -a** *ali students*
73
describe the output of the following linux command **chmod ugo+x** *newfile1* or **chmod a+x** *newfile1*
this will add the execute permission to the granted permissions for the user, group and other users
74
Historically these were saved in the /etc/passwd file but this now only contains each user and metadata for each user
within linux where were passwords historically stored
75
describe the command **Delgroup** *group*
within linux this is the basic syntax that will delete a group
76
being a member of this group allows a user to use the sudo command and temporarily take on the role of the root user
what benefits are there from being a member of the ## Footnote **sudo group**
77
from the ## Footnote **output of ls -l what do the characters 2 - 10 represent**
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
why must the **/etc/passwd** be publically readable
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
from this: ## Footnote [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
describe how the following syntax is used chmod [ugoa][-+=][rwx]
80
within linux what are the **three types of permissions that may be granted to a type of user**
these include: 1. Read [r] (from the file) 2. Write [w] (to the file) 3. Execute [x] (run the file)
81
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**)
describe how the permissions read,write and execute affect directories
82
this offers resistance to dictionary and rainbow attacks
what does the salt value added to a password offer resistance to
83
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 may owners may a linux file have
84
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
describe the linux directory ## Footnote **/etc/skel**