midterm rev Flashcards

(4 cards)

1
Q

the /etc/passwd file is called password file but in reality it doesn’t contain account passwords, explain why?

A

Passwords are stored in hashed form outside the /etc/passwd file for enhanced security

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

what is the purpose of the salt in the /etc/shadow file?

A

to prevent precomputed password attacks by adding randomness and strengthening password hashing

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

write a command to revoke user’s U access on all files without interfering with other users permissions

A

1) check user’s U permissions
getfacl -u U <filename>
2) revoke access
setfacl -m -u:U:--- <filename>
OR
setfacl -m -u:U:0 <filename>
3) verify you have revoked access
getfacl -u U <filename></filename></filename></filename></filename>

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

for i =1, i<=n {
setfacl -m -u:U:— filei
}
is this operation more efficient in terms of complexity than removing U’s rights to file fn only? explain and justify

A
  • the algorithm has a time complexity of O(n) as it is iterating through n files
  • while the second command has a constant time complexity of O(1)
  • in terms of time complexity then the single line command is more efficient
How well did you know this?
1
Not at all
2
3
4
5
Perfectly