Tag Info

Hot answers tagged

24

Shift-Command-G in Finder brings up a "Go to folder" dialog. Type in the name of the directory, for example, /usr/local. Finder will show the directory. I use this with Finder in 'View as Columns' While this doesn't give a browsable directory from the root directory down, I've found it quite useful.


21

Enter in Terminal: sudo chflags nohidden directoryname Whereby directory name is the name of the directory that you want to see in Finder. Reverse this by typing: sudo chflags hidden directoryname The Macintosh HD basically resembles the root directory. If you want it to appear on the desktop and in finder change this in the finder preferences. ...


19

sudo -s is far easier than enabling the root user since it just starts up a shell with root permissions as a one step, on demand action. Not only is it fast, but it doesn't need to be reconfigured when you don't need the root user and doesn't expose the server to any more risk or vulnerability that adding a root user would entail.


12

You can open up a textedit instance as root by entering the full path to the actual executable : sudo -b "/Applications/Textedit.app/Contents/MacOS/TextEdit" Once your root instance is open you could browse to the file you need or do this from the command line : sudo su - root -c "open -e /etc/apache2/httpd.conf"


10

sudo passwd root Enter YOUR password and you're in.


9

Take the script that you created: #!/bin/bash echo "plugin L2TP.ppp">>/etc/ppp/options echo "l2tpnoipsec">>/etc/ppp/options Save it in your home directory, or a 'scripts' directory inside your home directory, as l2tp.sh. Allow it to be executed(write this command in Terminal): chmod 700 ~/path/to/l2tp.sh To execute the file using sudo ...


9

If you can already log in on an account with administrator privileges (normal OS X account) and know its login password, you can reset the passwords of other admin accounts in System Preferences > Accounts. If you can't, you can reset the passwords of admin accounts in single user mode. See this question. If you actually mean the password of the root user, ...


9

sudo asks for the admin password only if you haven't used the command in the last 15 minutes or so. For extended root sessions I usually run sudo -s to create a new shell with root privileges.


5

Before iOS 7 this was not possible or feasible since iTunes would restore an image of the OS that would be free from any locking. Now there is Activation Lock which neatly pre-empts any attempt to remove the Find My iPhone feature of iCloud. Effectively, with Find my iPhone, your device is effectively locked to your Apple ID. For iOS 7 and later - enable ...


5

TextEdit isn't really the right tool for editing config files -- use TextWrangler instead. It's free, has built-in capability to edit files with root access from an admin account, as well as things like opening invisible files and directories easily editing files over SFTP, etc.


5

The file could simply still be open by something. Use lsof <file> to see which process is hogging it, if any. Otherwise sudo rm -rf /.Trashes/501/Users/myusername/Desktop should get rid of it If that didn't work, try removing all the flags it's complaining about first: chflags nohidden,nosappdn,noarch,noschg <file>


4

I usually do it bit differently than how others described here. Lets imagine you have two users. standard user: john admin user: kevin If john is logged in and wants to run as a root user(as kevin) here is how I do it. su kevin when asked enter kevin's password sudo npm "install" "." "--force" "--global" enter kevin's password again.


4

Figured it out. I'd changed my keyboard layout to Dvorak which apparently isn't honored at boot, defaulting to QWERTY. I pressed Cmd+O (where the S would've been) and it worked.


4

If you have an administrator user account set up on your Mac in addition to the root account, you can use the Directory Utility to do the following: Open the Directory Utility from /System/Library/CoreServices. Click the lock button and authenticate as an administrator: Go to the menu Edit → Change root password...: It should prompt you to enter a ...


4

If you don't have the password to the current admin account, there'll be no way to reset anything without a) calling your dad and asking for the old admin password, or b) restarting the computer in an alternate mode of some sort. However, to expand on what @patrix and @jaberg said, you should not reset (/set) the root password. Resetting the root password ...


3

I'm not sure I get what you want, but here's how things work on OS X. You can't prevent an admin user from becoming root with their own password. Root user isn't enabled, and doesn't even have a password unless you set one. So, if you want to prevent a user from editing hosts, you need to remove their admin rights. Anything you can lock with special ...


3

logind is a normal part of OS X. As @mt_ mentioned, there is a trojan that mimics it, but seeing a program by that name is entirely normal, not an indication of any problem. If you are concerned that the normal logind has been replaced by a trojan, check /System/Library/LaunchDaemons/com.apple.logind.plist, and make sure it refers to ...


3

Do It Yourself: Option 1 Open a Finder window in Column View. Choose Go To Folder from the Go menu. In the sheet that comes down, type /System/Library/CoreServices. You'll see two Finders there. Click on one of them (just one click!) and make sure it doesn't say "Classic Application" in the preview pane. If it doesn't, then that's the one you want. Hold ...


3

Save this: #!/bin/bash echo "plugin L2TP.ppp">>/etc/ppp/options echo "l2tpnoipsec">>/etc/ppp/options to your Desktop in a file named script.sh. Open a Terminal window and type: sudo bash ~/Desktop/script.sh Enter your password when prompted and all the commands in the file will run with super user privledges.


3

There really isn't a good reason to run your web server as root. It opens you up to all kinds of potential abuse. OS X defaults to running the service as a severely under privileged user to protect you. Don't make these changes unless you're absolutely certain you know what you're doing! The httpd.conf file for the default Apache2 installation that comes ...


2

Try adding the path in ~/.profile


2

Applescript has a parameter administrator privileges which adding it to your script will execute the command as Administrator. Extracted from Apple's Apple Script Language Guide: Execute the command as the administrator? Once a script is correctly authenticated, it will not ask for authentication again for five minutes. The elevated privileges and the ...


2

Since this question has already been bumped back to the front page, I might as well add some new information. In the iOS 7 preview, Apple demoed a feature called Activation Lock. From the iOS 7 features page: New security features in iOS 7 make it harder for anyone who’s not you to use or sell your device. Now turning off Find My iPhone or erasing ...


2

Root is deactivated by default, so no need to activate it or change the password. If you run Lion (10.7) or Mountain Lion (10.8) (you don't mention that - or I overlooked it) restart the Mac and boot using the recovery disc (hold down the option or alt key). There you can use the password utility to change the password of every account (including admins). ...


2

Change the command to: sudo chflags -R nohidden /* There is a danger in this of course. The converse will hide everything. So your best bet is to do: ls -lo to list the files you want to see.


2

The problem with using sudo chflags nohidden / is that it will unhide the root directory (which is already visible)... but you want to unhide particular folders that are inside the root directory. Which is why sudo chflags -R nohidden /* will work. But that will make everything in the root directory visible. Personally, I didn't want to make everything ...


2

Here's a way to avoid running TextEdit as root: EDITOR='open -Wne' sudo -e /etc/apache2/httpd.conf You will need to quit the copy of TextEdit after editing the file. sudo -e, sometimes known as sudoedit but not on OS X, makes a temporary copy of the file with write permission for the current user, invokes an editor on it in the usual Unix fashion, and ...


2

The following article may help your problem. :) Mac OS X: Require Password at Single User Mode


2

Launch this from the terminal: sudo -u root /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome It will ask you whether you want to set Google Chrome as your default browser. I assume the same technique works for Firefox and most browsers. I had the same problem when running Skype as root and it fixed my problem (it opens links in Chrome ...


2

This is a strange part of the POSIX specification. See unix, difference between path starting with '/' and '//'. Two slashes in the beginning of a pathname are interpreted in an implementation-defined way. As far as I know, only cygwin actually takes // to mean something different than / (//FOO maps to a network drive called FOO, / maps to the local root). ...



Only top voted, non community-wiki answers of a minimum length are eligible