Topic 16 – Users and security Flashcards
within linux where were passwords historically stored
Historically these were saved in the /etc/passwd file but this now only contains each user and metadata for each user
what does the salt value added to a password offer resistance to
this offers resistance to dictionary and rainbow attacks
how does linux determine which file permissions to use and what 3 scenarios are spawned from this
to achieve this linux uses the user id (UID) and group id (GID) of the current process and the file
from here:
- 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
- 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
- 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
this linux command is used to administer /etc/group and /etc/gshadow such as adding and deleting members
describe the linux command
Gpasswd
- 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
describe briefly
Access control lists (ACL)
what tasks can super users carry out that normal users cant
this type of user can:
Create change or delete hardware and system files
describe the first 2 columns of the /etc/shadow file and subsequent columns
The columns for this file are as follows:
- First column is the username
- Second column is the hashed password
- Subsequent fields display password set times and password expiry times
this is a linux command used to delete a user or group from the system
describe the linux command
Deluser
what is the
default behaviour of deluser
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
this is represented as:
note
some linux commands allow the numeric expression to be entered as the permissions
describe the binary represenation of the linux permissions
this will set permissions on newfile1 as:
- User has read,write,execute
- Group has read,write
- Other users have read
describe the execution of the linux command
chmod u=rwx,g=rw,o=r newfile1
this is the basic syntax for adding a new user
describe the command
Sudo adduser user
these include:
- the user [u] (you, the owner of the file)
- the group [g] that the file belongs to
- any other users [o]
within linux what are the 3
types of users that can have permisions granted to them
this column is subdivided into three distinct parts which are separated by a $
- $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,
- $salt - this holds the salt value generated by the OS on the password creation it will be added to the password before encryption
- $hash - this is the hashed password with salt hash value
describe the
second column of the /etc/shadow file
this is a linux file that holds all the groups on the system
describe the linux file
/etc/group
this is the basic syntax to add a new group in linux
describe the command
sudo addgroup group
this linux command is used to add new users and groups
describe the linux command
Adduser
name 5 properties of a hash function
these include:
- the same input always gives the same output
- a small change in input gives a large change in output
- the output doesn’t depend on the length of the input
- the chance of two different inputs giving the same output is extremely small
- the transformation is one-way.
this is a file that has passwords and the hash value already calculated
describe briefly a dictionary attack
describe the linux command
Addgroup
this is a linux command that is used to add groups to the system
describe the execution of the linux command
chmod u=rwx,g=rw,o=r newfile1
this will set permissions on newfile1 as:
- User has read,write,execute
- Group has read,write
- Other users have read
the actions it takes include:
- Adds the user to the system
- Adds a group of the same name to the system
- The user and group are then associated
- A home directory is created for the user in /home
- Default files are copied from the /etc/skel directory to /home/user
- Password configuration is asked for
- Metadata is asked for such as full name, mobile number
what are the 7
actions that adduser takes upon execution
within linux what are the 3
types of users that can have permisions granted to them
these include:
- the user [u] (you, the owner of the file)
- the group [g] that the file belongs to
- any other users [o]
this linux command will delete ali from the students group
what is the outcome of executing the following linux command
sudo gpasswd -d ali students
generates all possible combinations of letters, digits and symbols up to some length
describe briefly a
rainbow attack
what benefits are there from being a member of the
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
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
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
describe briefly
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
describe the linux file
/etc/group
this is a linux file that holds all the groups on the system
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
The columns for this file are as follows:
- First column is the username
- Second column is the hashed password
- Subsequent fields display password set times and password expiry times
describe the first 2 columns of the /etc/shadow file and subsequent columns
what are the 7
actions that adduser takes upon execution
the actions it takes include:
- Adds the user to the system
- Adds a group of the same name to the system
- The user and group are then associated
- A home directory is created for the user in /home
- Default files are copied from the /etc/skel directory to /home/user
- Password configuration is asked for
- Metadata is asked for such as full name, mobile number