giulianopz / lfcs

my personal notes to prepare for the Linux Foundation Certified System Administrator (LFCS) exam
https://giulianopz.github.io/lfcs/
156 stars 56 forks source link

Task L solution contains incorrect visudo command #5

Closed kenzie-rasmussen closed 1 year ago

kenzie-rasmussen commented 1 year ago

Really appreciate this guide! I'm studying through the exam questions for my upcoming exam.

While doing task L this morning, discovered that my Ubuntu machine didn't like the visudo command given here. A little research taught me that sysadmin is a user, not a group, so it doesn't need the %. There was also a missing (ALL) chunk that other definitions in the sudoers file had.

If there's something I didn't know, please correct me! I'm still learning. But I wanted to give back to this guide since it's so helpful, so I made a quick correction here for an easy update.

giulianopz commented 1 year ago

Hi @kenzie-rasmussen ,

you are right with respect to the '%' sign, that is for groups not users. Instead, I think the (ALL) string is not needed here although the internet is bloated with copy-pasted examples that show the opposite (that (ALL) is the Runas_Alias part of the User Specification and the sysadmin user is not requested to impersonate other users). See the following example from sudoers(5):

FULLTIMERS      ALL = NOPASSWD: ALL

Please, remove (ALL) from that line.

kenzie-rasmussen commented 1 year ago

Okay! I didn't realize the (ALL) was specifying a Runas_Alias, that's good to know. I've updated the request with the changes to not include it.

giulianopz commented 1 year ago

Perfect, thanks!