Root user on a Mac
If you use the command line on a Mac, you may run into the issue that you can't change over into the root user. If you try to su -root to change to the root user, it will fail.
One way around this is to use the sudo command as a prefix to the command you are trying to run. When you prefix a command with sudo, the command gets run as the root user. For example, sudo rm file.text would remove the file.text file as to root user (which may be needed depending on the permissions of this file.
Another way around this is to enable the root user in the shell. You can do this by assigning a password to the root user using this command: sudo passwd root and then entering a password. Once you do this, the su -root command will be allowed, and you will be able to run in the shell as the root user.
One way around this is to use the sudo command as a prefix to the command you are trying to run. When you prefix a command with sudo, the command gets run as the root user. For example, sudo rm file.text would remove the file.text file as to root user (which may be needed depending on the permissions of this file.
Another way around this is to enable the root user in the shell. You can do this by assigning a password to the root user using this command: sudo passwd root and then entering a password. Once you do this, the su -root command will be allowed, and you will be able to run in the shell as the root user.
| Rating: | 100% positive, 1 Vote |
| Categories: | Mac OS X |
| Added: | on Jun 29, 2007 at 9:56 am |
| Added By: | an anonymous user |
| Searches: | root user mac command |

