Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sudo: /etc/sudoers is owned by uid 501, should be 0
- sudo: no valid sudoers sources found, quitting
- mount -uw /
- chown root:wheel /etc/sudoers
- chmod 440 /etc/sudoers
- reboot
- # sudoers file.
- #
- # This file MUST be edited with the 'visudo' command as root.
- # Failure to use 'visudo' may result in syntax or file permission errors
- # that prevent sudo from running.
- #
- # See the sudoers man page for the details on how to write a sudoers file.
- #
- # Host alias specification
- # User alias specification
- # Cmnd alias specification
- # Defaults specification
- Defaults env_reset
- Defaults env_keep += "BLOCKSIZE"
- Defaults env_keep += "COLORFGBG COLORTERM"
- Defaults env_keep += "__CF_USER_TEXT_ENCODING"
- Defaults env_keep += "CHARSET LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE"
- Defaults env_keep += "LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME"
- Defaults env_keep += "LINES COLUMNS"
- Defaults env_keep += "LSCOLORS"
- Defaults env_keep += "SSH_AUTH_SOCK"
- Defaults env_keep += "TZ"
- Defaults env_keep += "DISPLAY XAUTHORIZATION XAUTHORITY"
- Defaults env_keep += "EDITOR VISUAL"
- Defaults env_keep += "HOME MAIL"
- # Runas alias specification
- # User privilege specification
- root ALL=(ALL) ALL
- %admin ALL=(ALL) ALL
- # Uncomment to allow people in group wheel to run all commands
- # %wheel ALL=(ALL) ALL
- # Same thing without a password
- # %wheel ALL=(ALL) NOPASSWD: ALL
- # Samples
- # %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
- # %users localhost=/sbin/shutdown -h now
- machine:~ user$ ls /private/etc/sudoers
- -r--r----- 1 root wheel 1275 13 Jun 2012 /private/etc/sudoers
- /etc/sudoers
- total 0
- drwxr-xr-x 2 501 0 68 Oct 23 23:56 yourusername
- drwx------ 3 501 0 102 Nov 24 00:57 ts
- total 0
- drwx--x--x 4 yourusername wheel 136 Oct 23 23:56 .
- drwxr-xr-x 80 yourusername wheel 2720 Nov 24 01:55 ..
- drwxr-xr-x 2 root wheel 68 Oct 23 23:56 yourusername
- drwx------ 3 root wheel 102 Nov 24 00:57 ts
- total 0
- drwx--x--x 4 root wheel 136 Oct 23 23:56 .
- drwxr-xr-x 80 root wheel 2720 Nov 24 01:55 ..
- drwxr-xr-x 2 root wheel 68 Oct 23 23:56 yourusername
- drwx------ 3 root wheel 102 Nov 24 00:57 ts
- total 0
- drwxr-xr-x 2 0 0 68 Oct 23 23:56 dan
- drwx------ 3 0 0 102 Nov 24 00:57 ts
- UID is now set to 0 and not 501.
- -r--r----- 1 501 0 1563 Nov 14 17:53 /private/etc/sudoers
- -r--r----- 1 0 0 1563 Nov 14 17:53 /private/etc/sudoers
- sudo su
- sudo chown -R root:wheel /var/db/sudo/ts/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement