midterm rev Flashcards
(4 cards)
the /etc/passwd file is called password file but in reality it doesn’t contain account passwords, explain why?
Passwords are stored in hashed form outside the /etc/passwd file for enhanced security
what is the purpose of the salt in the /etc/shadow file?
to prevent precomputed password attacks by adding randomness and strengthening password hashing
write a command to revoke user’s U access on all files without interfering with other users permissions
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>
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
- 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