Content added Content deleted
imported>Phrack (New page: ===Mac OSX: get root access or reset root password=== *find out your username if you are an unprivileged user by opening Finder:Applications:Terminal: your username is the string right be...) |
imported>mutante m (minor formatting and a few links) |
||
Line 1: | Line 1: | ||
===Mac OSX: get root access or reset root password=== |
===[[Mac]] [[OSX]]: get root access or reset root password=== |
||
*find out your username if you are an unprivileged user by opening Finder:Applications:Terminal: your username is the string right before the $-symbol |
*find out your username if you are an unprivileged user by opening Finder:Applications:Terminal: your username is the string right before the $-symbol |
||
Line 5: | Line 5: | ||
*push the power-button and immediately press cmd(the apple-key)+s to enter single-user-mode |
*push the power-button and immediately press cmd(the apple-key)+s to enter single-user-mode |
||
*mount the root-filesystem in r/w mode by typing: "mount -uw /" |
*mount the root-filesystem in r/w mode by typing: "mount -uw /" |
||
*type "visudo" |
*type "visudo" (--> [[vi]]) |
||
*go to the lines starting with root and %admin and press "dd" on both of them |
*go to the lines starting with root and %admin and press "dd" on both of them |
||
*press i to enter insert mode and add the following lines: |
*press i to enter insert mode and add the following lines: |
||
**root ALL=(ALL) NOPASSWD: ALL |
**<tt>root ALL=(ALL) NOPASSWD: ALL</tt> |
||
** |
**<tt>%admin ALL=(ALL) NOPASSWD: ALL</tt> |
||
** |
**<tt>YOURusernameYOUfoundOUT ALL=(ALL) NOPASSWD: ALL</tt> |
||
***(where you need to put a TAB-character between e.g. root and the first ALL - and |
***(where you need to put a TAB-character between e.g. root and the first ALL - and between (ALL) and NOPASSWD: - and a space-character between NOPASSWD: and ALL |
||
*press escape to exit input mode and enter the ":" character by pressing shift and ; on an english keyboard or shift and . on a german keyboard to enter command mode |
*press escape to exit input mode and enter the ":" character by pressing shift and ; on an english keyboard or shift and . on a german keyboard to enter command mode |
||
*enter "x" and press enter to save and close |
*enter "x" and press enter to save and close |
||
*enter reboot to reboot the machine |
*enter reboot to reboot the machine |
||
*once you're back in standard OSX open the terminal application again (Finder:Applications:Terminal) and enter: |
*once you're back in standard OSX open the terminal application again (Finder:Applications:Terminal) and enter: |
||
**sudo passwd YOURusernameYOUfoundOUT |
**[[sudo]] passwd YOURusernameYOUfoundOUT |
||
***enter your new password, press enter and enter it again to confirm it |
***enter your new password, press enter and enter it again to confirm it |
||
**sudo passwd root |
**sudo passwd root |
||
Line 22: | Line 22: | ||
*now, if you like, you can open "System Preferences", go to "Accounts" and click the lock-symbol at the bottom left of the System Preferences dialog, authenticate with username: root and your new password and give YOURusernameYOUfoundOUT admin privileges by checking the "allow user to administer this computer" checkbox |
*now, if you like, you can open "System Preferences", go to "Accounts" and click the lock-symbol at the bottom left of the System Preferences dialog, authenticate with username: root and your new password and give YOURusernameYOUfoundOUT admin privileges by checking the "allow user to administer this computer" checkbox |
||
===you now have admin privileges with your user and the ability to add new users to the system, change all settings, install software etc.=== |
===you now have admin privileges with your user and the ability to add new users to the system, change all settings, install software etc.=== |
||
[[Category:Mac]] |
Revision as of 09:16, 20 October 2007
Mac OSX: get root access or reset root password
- find out your username if you are an unprivileged user by opening Finder:Applications:Terminal: your username is the string right before the $-symbol
- shutdown your mac
- push the power-button and immediately press cmd(the apple-key)+s to enter single-user-mode
- mount the root-filesystem in r/w mode by typing: "mount -uw /"
- type "visudo" (--> vi)
- go to the lines starting with root and %admin and press "dd" on both of them
- press i to enter insert mode and add the following lines:
- root ALL=(ALL) NOPASSWD: ALL
- %admin ALL=(ALL) NOPASSWD: ALL
- YOURusernameYOUfoundOUT ALL=(ALL) NOPASSWD: ALL
- (where you need to put a TAB-character between e.g. root and the first ALL - and between (ALL) and NOPASSWD: - and a space-character between NOPASSWD: and ALL
- press escape to exit input mode and enter the ":" character by pressing shift and ; on an english keyboard or shift and . on a german keyboard to enter command mode
- enter "x" and press enter to save and close
- enter reboot to reboot the machine
- once you're back in standard OSX open the terminal application again (Finder:Applications:Terminal) and enter:
- sudo passwd YOURusernameYOUfoundOUT
- enter your new password, press enter and enter it again to confirm it
- sudo passwd root
- enter the same new password again, press enter and confirm it
- sudo passwd YOURusernameYOUfoundOUT
- now, if you like, you can open "System Preferences", go to "Accounts" and click the lock-symbol at the bottom left of the System Preferences dialog, authenticate with username: root and your new password and give YOURusernameYOUfoundOUT admin privileges by checking the "allow user to administer this computer" checkbox