Sunday 24 June 2018

Enable root user in Mac Terminal

By default in Mac, root user will be in disabled state. And hence the bash terminal will not login as root.
Use the below command to enable the root user run Mac and login as root.

1. Open the Terminal and run the below command. First enter the user password and then enter the new password for root user.

bash-3.2$ dsenableroot
username = abc
user password:
root password:
verify root password:

dsenableroot:: ***Successfully enabled root user.

bash-3.2$ su - root
Password:
abc-MBP:~ root# id
uid=0(root) gid=0(wheel) groups=0(wheel),1(daemon),2(kmem),3(sys),4(tty),5(operator),8(procview),9(procmod),12(everyone),20(staff),29(certusers),61(localaccounts),80(admin),701(1),33(_appstore),98(_lpadmin),100(_lpoperator),204(_developer),250(_analyticsusers),395(com.apple.access_ftp),398(com.apple.access_screensharing),399(com.apple.access_ssh)

abc-MBP:~ root#

No comments:

Post a Comment