sudo passwd root ??

About writing shell scripts and making the most of your shell
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Locked
HP7

sudo passwd root ??

Post by HP7 »

Hello all !! :)
Today i was in my Comp sci lab ..and we were performing some experiment on linux (ubuntu)
which needed root privileges...somebody had changed the root password..when i tried to login as root..
it showed authentication failed...
Then my lab attendent came and typed
> sudo passwd root
and it asked for a new password !!
I was shocked...
My query is...
1) How can some other user change the root password ? and does it not compromise with the security ! :?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
lmintnewb2

Re: sudo passwd root ??

Post by lmintnewb2 »

There's a ton of ways to do this if someone w any gnu/nix know-how gets physical access to a system. Though if xyz is say, encrypted that's something else.

sudo provides the same privileges as root. Though in this case the person would need the sudo users password to do anything. You can get root with sudo w several cmds too. Ie: "sudo su" and "sudo -i" are a couple.

Overall imo no, as long as the OS is setup right it doesn't compromise security. Someone would still have to know a user with sudo privileges credentials. Though as mentioned, easy ways around that for someone with physical access and some know how.

But wouldn't waste much time worrying about it. Install a good encryption app and keep the stuff you care about in an encrypted directory or partition. At least that's my preference. I don't prefer the whole disk encryption approach.
daret

Re: sudo passwd root ??

Post by daret »

lmintnewb2 wrote: But wouldn't waste much time worrying about it. Install a good encryption app and keep the stuff you care about in an encrypted directory or partition. At least that's my preference. I don't prefer the whole disk encryption approach.
What encryption app do you use?
User avatar
Pilosopong Tasyo
Level 6
Level 6
Posts: 1432
Joined: Mon Jun 22, 2009 3:26 am
Location: Philippines

Re: sudo passwd root ??

Post by Pilosopong Tasyo »

HP7 wrote:How can some other user change the root password ?
Your lab administrator (or whoever's in charge of your computer lab) created users that are classified as 'Administrators' instead of 'Desktop Users.' Anyone classified under an admin account can enable/change/disable the root user via sudo just by using their password. (Of course, having physical access to the machine itself, just about anyone with enough knowledge will be able to do anything to that system.)
HP7 wrote:and does it not compromise with the security !
Limit the number of administrator accounts to what's essential. The rest should be classified as 'Desktop Users.' That will disable their ability to use their password to gain admin rights via sudo (or any other mechanism that elevates privileges).
o Give a man a fish and he will eat for a day. Teach him how to fish and he will eat for a lifetime!
o If an issue has been fixed, please edit your first post and add the word [SOLVED].
lmintnewb2

Re: sudo passwd root ??

Post by lmintnewb2 »

Atm don't, do not have enough sensitive stuff to bother with. A couple pw protected archives stashed somewhere.

Which is a tech sec tactic I've long liked. Create a directory or file in some non-standard location in the os's filesystem. Ie: Not Documents.

The OS doesn't care if there's an extra directory in xyz location (also applies to window$ too) . You know it's there, others don't and it'd be hard as heck and unlikely x-malicious-person is going to pick apart every directory on an OS, looking for stashed data.
Locked

Return to “Scripts & Bash”