You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Enabling Internet access for Root Account

Hi all, I am new to coding. Would like to check if it's possible to grant internet access while I am on my root account?


I manage to enable root user via the user & group settings, however seems to be unable to connect to my wifi.


device: MacBook Pro apple M1 silicon

OS: Sonoma 14.5


thank you in advance.


Best regards,


Ivan

Posted on Nov 4, 2024 10:42 PM

Reply
4 replies

Nov 5, 2024 12:50 AM in response to n3wbieec0de

You are entering dangerous territory.

There is absolutely no reason on a modern Unix system like macOS to enable login to the root account.

Everything that you may need to achieve can be done from a normal admin account.

Login as root is disabled for good reason.

Since you are new to coding you may have been led to believe that you needed root access, but whoever told you so has badly misinformed you.

Nov 5, 2024 1:21 AM in response to n3wbieec0de

I will second the caution about enabling Root User


The root user is disabled by default.


Although you can enable it, it’s recommended that you avoid logging into a Mac as the root user, either locally or remotely. Instead, use the sudo command-line tool to perform tasks that require root user privileges. You can restrict access to sudo by adding users to the /private/etc/sudoers file.


WARNING: Use extreme caution if you log in as the root user. You can lose data, damage the system by moving or deleting critical files, or cause other problems that can only be solved by reinstalling macOS. If you log in as the root user, always log out after completing your task, log in as an administrator, then disable the root user.

Nov 5, 2024 2:42 PM in response to n3wbieec0de

'root' is the one known account on your system. There are script kiddies constantly probing systems and attempting to login to the 'root' account. If they succeed, they have access to a privileged account, which is the worse thing that can happen to you.


What is it you think you need to do logged in as 'root'? If we know more, maybe we can suggest ways to not need the root account enabled for login.


From the command line, you can use the 'sudo' command.


sudo command-that-needs-to-be-run-as-root

sudo -s # get a root login prompt


If you are into 'ssh' you can store your personal ssh-keygen keys in the /var/root/.ssh/authorized_keys file and then ssh root@localhost to get a root prompt. Just make sure you protect your ssh-keygen keys.


It is possible to start some GUI programs running as root


sudo /Applications/program-name.app/Contents/MacOS/program-executable-file

Enabling Internet access for Root Account

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