Need urgent help to run in root

Discussion in 'Mac Programming' started by JoshBoy, Mar 14, 2012.

  1. macrumors 6502

    JoshBoy

    Joined:
    Oct 12, 2008
    Location:
    Sydney, Australia
    #1
    I am trying to get terminal to run in root, when i type in sudo -s i get this response, please help

    Last login: Tue Mar 13 21:46:28 on console
    unknown-e4-ce-8f-31-f3-fa:~ joshua$ sudo -s
    sudo: can't open /private/etc/sudoers: Permission denied
    sudo: no valid sudoers sources found, quitting
    unknown-e4-ce-8f-31-f3-fa:~ joshua$
     
  2. macrumors 68000

    Joined:
    Jan 28, 2003
    Location:
    Less lost in L.A.
    #2
    In case it matters, and it might with Lion, tell this audience what version of OS X you are using.

    Is the user account that you are using have "Allow user to administer this computer" checked?
     
  3. thread starter macrumors 6502

    JoshBoy

    Joined:
    Oct 12, 2008
    Location:
    Sydney, Australia
    #3
    I am online and it worked out by creating a root user (not another normal user account) and involved logging out and logging in as the "root" user that was then displayed
     
  4. macrumors 68000

    Sydde

    Joined:
    Aug 17, 2009
    #4
    You can skip the logging in/out step by changing users in the terminal itself with "su adminUserName" (it will ask for the admin user's password).

    This does not really belong in the Programming forum.
     

Share This Page