0
votes
0answers
16 views

path setting appears twice in env output

After an OS version upgrade I have the following strange problem: % port MacPorts 2.3.1 ... % sudo -i # port MacPorts 2.3.1 % sudo port sudo: port: command not found Furthermore, if I do it all ...
1
vote
0answers
39 views

How can I redirect OS X dtruss output when running with sudo?

I'm running dtruss on Mac OS X 10.9. Simple example is: sudo -c ls But I'd like to capture the dtruss output into a file. I saw something that suggests that I can do something like: sudo bash -c ...
1
vote
2answers
51 views

Security risks using SUDO in TERMINAL on MAC

I'm very new to using Terminal and anything like that and stupidly followed an article that uses Terminal with the SUDO command. The sudo command basically loaded a file which updated my ...
5
votes
3answers
2k views

Running docker as sudo

I installed boot2docker and the i run ./boot2docker start export DOCKER_HOST=tcp://localhost:4243 so i started the tutorial from their docker site. I don't understand one thing: when i run ...
0
votes
1answer
50 views

How can I install my script into the user's $HOME/.bin (or $HOME/bin) directory and make sure that is in their PATH?

Edit: places where I said $HOME/.bin I should have written $HOME/bin or any equivalent is fine. So I have a bash script which I am distributing as a client for my API. Current version installs like ...
0
votes
1answer
124 views

Get around permission errors

In Ubuntu, whever I run into a permissions error I just run the command as sudo at it usually works. Not the case in OSX: $ ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" ...
1
vote
0answers
42 views

Why is changing the shortname not recommended procedure?

Some Background I had an old iMac with Snow Leopard on it. It was so outdated I zeroed out the drive and reinstalled Snow on it (I'm still waiting on Mavericks to download... sigh). As I was setting ...
0
votes
2answers
5k views

Reset root password or enable sudo on MacOS X Mavericks

I have a MacOS X Mavericks installation with a single user Admin and empty password for that account: Now I'm trying to install Cocoapods, but can't use "sudo", because I don't know the root ...
0
votes
2answers
152 views

Shebangs do not like sudo in OSX

Using sudo in the shebang seems completely broken. The following code: #!/usr/bin/sudo /bin/bash echo "this should work" works fine on Ubuntu, but on OSX gives me: sudo: effective uid is not 0, is ...
3
votes
3answers
876 views

“X is not in the sudoers file. This incident will be reported.” Where?

"X is not in the sudoers file. This incident will be reported." Where is it reported?
2
votes
2answers
657 views

Understanding homebrew 'no-sudo' philosophy and questioning FAQ

Having fresh install of OS X, I decided to install python package manager in proper way. So I started googling and found homebrew is the best way. Now I got two questions: from homebrew FAQ: ...
1
vote
3answers
1k views

Change the sudo su shell

Whenever I run sudo su from my normal zsh (which uses the oh-my-zsh framework), I'm forced to use the old Bourne shell (sh) by default (obviously; this is standard behaviour on most *nix-like ...
0
votes
2answers
131 views

How can I add myself to the wheel group without using Sudo or Root commands?

Right now I am sitting at work with the task to attempt to bypass permissions and do anything I shouldn't be able to. I have nothing but a standard User and Terminal. I don't know the administrator ...
5
votes
1answer
790 views

Can I install Homebrew without sudo privileges?

Homebrew nicely allows package installations without sudo privileges, but it seems that I need admin privileges to install Homebrew itself. I'd like to install Homebrew in a Mac environment where I ...
0
votes
2answers
1k views

Why can I only run 'sudo node' and not just 'node'?

I just got a new macbook and installed node.js using the official installer. For some reason I can only run node.js using sudo node and not just node. I double checked the $PATH and the path to node ...
0
votes
2answers
60 views

OS 10 - How to keep my account superuser?

I'm not using root on my macbook, so almost every time I will get some permission error which reminds me of adding 'sudo'. But it's so awkward. Is there any way to get around this issue? Can I make my ...
0
votes
1answer
162 views

Sudo password not required? OS X 10.8 (Mountain Lion)

I recently upgraded to a Macbook Pro Retina running OS X 10.8.3. I was going through the process of installing various command line tools when I noticed that it wasn't asking for my root password when ...
2
votes
4answers
2k views

Is it possible to run software as a different user under OS X Mountain Lion?

I've been trying to run apps as a different user. Attempt 1 sudo -u otheruser open /Applications/TextEdit.app launches the app but it uses the current user, not otheruser. Attempt 2 login username ...
23
votes
3answers
1k views

Sudo su vs su linux

If I enter in the password to su when prompted, it doesnt work while sudo su does. Also, when a command is executed using sudo (command), does sudo automatically execute it by root by default (since ...
0
votes
2answers
171 views

i want alice to run any command as root, but can not run commands as any other user

Say I have 2 users - 'alice' and 'bob' and want to allow 'alice' to run any command as root, but not run commands as 'bob' or any other user, am I able to do this, and if so how ? consider this ...
4
votes
2answers
457 views

How do I back out of sudo privileges in OS X

Is there a command to de-elevate the user from sudo permissions after I execute a command such as sudo pmset sleep 0 so that when I try to execute another sudo command it asks for my password again? ...
3
votes
3answers
3k views

Adding a line into the hosts file, getting permission denied when using sudo - Mac

I'm trying to add a line into the hosts file on my Mac by executing a one line command on the terminal. I thought this would be easy using sudo, but it returns "permission denied" when I try to add ...
2
votes
4answers
277 views

Accidentally did “chmod 600 -R /” on my macbook pro

I accidentally entered sudo chmod 600 -R / when I meant to enter /Documents/some_file and now everything comes up as permission denied. The root password isn't working. All my applications are shut ...
1
vote
0answers
103 views

I can't get through with my password on sudo, can anyone help me?

I know that the password doesn't show up on the screen that's all good. I just can't seem to get any further as I am typing my user password but this comes up: 2012-12-04 22:38:14.815 ...
2
votes
4answers
929 views

How do I revert to having sudo ask for a password again?

I accidentally made a mistake and made my sudo commands passwordless on my Mac. How can I get it back to default?
0
votes
1answer
147 views

How can I make sudo never ask for a password with a certain argument, but always ask for a password with another argument?

For example, I want to allow sudo shutdown -c to always be run without entering a password, but sudo shutdown without -c to always require a password (even if I've authenticated to sudo previously).
2
votes
3answers
5k views

Open root terminal without switching user (OS X)

I'm not in sudoers: ..... is not in the sudoers file. This incident will be reported. How can I sudo in this terminal window, without switching user? The well-known command sudo -u ...
2
votes
1answer
726 views

How do I open a folder or file using the editor from Terminal on OS X?

I love Ubuntu, and I used it for a long time before Unity. I loved it. Now I have a Mac... I have some habits remaining from my Ubuntu workflow. Sometimes I like to open folders from terminal ...
0
votes
3answers
800 views

How to determine if an app was launched via open as root on Mac OS X?

In OS X, how can I determine if an app launched via the open command was launched with elevated permissions? I tried as an example sudo open http://www.google.com/, but Activity Monitor doesn't seem ...
0
votes
1answer
805 views

Unable to use command line on Mac OS X

I can't use my command line (terminal). sudo gem install compass but I only get "command not found". I'm admin om my Mac and my password is not blank. I've also tried this: defaults write ...
4
votes
4answers
11k views

How can I switch back normal mode from sudo mode in Linux and Mac OS X?

I use sudo su command to do something in Mac OS X but don't know how to switch back. Hope you guy can do me a favour.
1
vote
3answers
1k views

Sudo segmentation fault in Terminal [duplicate]

Possible Duplicate: Cannot do sudo: “/etc/sudoers is mode 0740, should be 0440” sudo: /etc/sudoers is mode 0640, should be 0440 Segmentation fault Any time I am trying to do ...
1
vote
2answers
295 views

custom sudo command

How can I make custom functions accessible to the sudo command? I have my Mac OS X set up with Bootcamp, but also with VirtualBox so I can run Windows for testing websites in IE. I have to run this ...
1
vote
1answer
2k views

“You are not in the sudoers file” error after running sudo command

I tried using a sudo command on my iMac to create a bootable version of Ubuntu, but when I run the command by pressing enter, I got the warning that the command might screw up my system, which I ...
2
votes
3answers
7k views

bash: sudo: command not found on OS X Lion

This baffles me. sudo [any command here ] bash: sudo: command not found Eek! I tried to uninstall the Ruby Version Manager (it wouldn't compile Ruby for some reason). Somewhere in following their ...
4
votes
3answers
21k views

How to execute a command with admin privileges and access to files of the logged in user?

I have some problems understanding sudo. I am logged in on a terminal as an non-admin/non-root user. This "normal" user is not in the sudoers file (and shouldnt be, in my opinion). Now I try to ...
4
votes
2answers
4k views

Cannot do sudo: “/etc/sudoers is mode 0740, should be 0440”

I have a problem: I don't have a root password on my mac. I just have an Admin account, which can do stuff using sudo. Now, I wanted to add my normal user to the /etc/sudoers file as well. Since it ...
8
votes
5answers
12k views

sudo chmod -R 777 /

sudo chmod -R 777 / I did this. It was a mistake. Is there any way to undo it? Basically it's messed up more things than I can list. I don't have time-machine enabled on my mac.
7
votes
4answers
15k views

On Mac, how do I give myself permanent sudo privleges?

In Mac OS X 10.6, how do I give myself permanent sudo privleges? is it like linux, in the "/etc/sudoers" file?
2
votes
2answers
2k views

Does sudo need root account enabled in MacOS X?

If the owner of a Mac hasn't enabled the root account (via NetInfo manager and the usual suspects) then is it possible to successfully execute a sudo'd command to effect root tasks? Why / Why not? I ...
5
votes
7answers
13k views

How to run a program as root without “sudo”?

I have a certain binary program on OS X that can only be run as root. I'm tired of prepending sudo each time I invoke it and typing the password, and would like it to automatically run as root when I ...
7
votes
1answer
2k views

non-interactive ssh sudo… prompts for the password in plain text

I'm running some non-interactive ssh commands. The ssh authentication is taken care of fine through the ssh agent, but if I run a command that requires sudo then the password prompt in my terminal is ...
1
vote
1answer
569 views

Installing a program in OS X using “make install” without being superuser?

I'm trying to install the Insight debugger on OS X with "make install" but my permissions aren't high enough and I'm always denied. Is there any way to install without having/being a superuser? I have ...
0
votes
2answers
478 views

Would running sudo rm -rf / in OS X wipe out any attached time machine backups?

Would running (rm deliberately broken) sudo r m -rf / Wipe out any USB-attached external hard drives being used for time machine backups?
8
votes
5answers
4k views

How do I tell sudo to write files with a umask of 0022?

I recently upgrading to Snow Leopard. I have noticed that some files written by MacPorts are installed with the wrong permission -- they are written with a umask of 0077. I think I have narrowed down ...
3
votes
2answers
4k views

Mount TrueCrypt USB device w/o sudo on Mac OS X

I made a TrueCrypt partition on a USB drive. I can mount it fine but only using admin password, either via the graphical interface or via sudo truecrypt --auto-mount=devices. This is preventing me ...
3
votes
3answers
9k views

How do I delete a file using the Terminal from my Trash in Mac OS X?

From a previous question I have applied following command to my file. sudo chflags -R nouchg TopSites.plist sudo chmod 444 TopSites.plist Now that the file is locked, I don't know how to remove it. ...