Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Terminal root login just works while being logged in as admin

Hi there


I got an issue while trying to login as root in terminal using "su -". Everything works fine, if I am logged in with an Admin Account. However .. if I am logged in as normal user and try to login as root in the terminal by typing "su -" I just get sorry after I typed the pwd. Is this intended? Is there a way to login as root while being logged in as non-admin user?


Regards

Julian

Posted on Aug 5, 2015 1:25 AM

Reply
3 replies

Aug 5, 2015 6:29 AM in response to JulianMa

I'm assuming it is intended.


You could try:

su yourAdminAccount

Password: enter.your.admin.password

su -

Password: enter.root.password

Or

su yourAdminAccount -c su -

Password: enter.your.admin.password

Password: enter.root.password

NOTE: These days very few people give the root account a password, as it is a known account that is frequently probed from the internet to attempt to break into network connected Macs. Most people use sudo to get root privileges. Of course sudo is not going to work for non-admin accounts, because if they could sudo, then they would by definition "Be" and admin account now. But you could still use su to get to an admin account, and from there issue sudo to become root

su yourAdminAccount

Password: enter.your.admin.password

sudo su -

Password: enter.your.admin.password

The difference is that you never need to give 'root' a password, so it is impossible for someone to guess the password when making a network attack.

Terminal root login just works while being logged in as admin

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.