Used when executing commands as another user.

learn more… | top users | synonyms

2
votes
1answer
66 views

User specific host file

I would like to add a user specific host file on my Mac (El Capitan 10.11.5) to a users home directory and have this be checked in addition to /etc/hosts when resolving domain names. I found a ...
0
votes
0answers
15 views

/usr is not writable. Run this installer as root error when installing Phoronix

I'm trying to install Phoronix Test Suite. Once I cd to the folder it downloads, I try sudo ./install-sh which gives the error ERROR: /usr is not writable. Run this installer as root or specify a ...
1
vote
1answer
58 views

Why can't I create a directory on a mounted USB drive after mkdir, but finder new directory works?

I'm trying to create a directory on a USB3 mounted hard disk drive and it is failing even though the permissions are open: bash-3.2$ ls -al total 0 drwxrwxrwx+ 2 user user 68 Jun 3 18:24 . ...
-1
votes
1answer
59 views

Can naming/running a program “sudo” somehow cause problems?

I hope this is an appropriate place to post this--I have no idea what happened. I named a c++ file (a simple sudoku solver) "sudo.cpp" and then compiled it with "g++ sudo.cpp -o sudo" and ran "./sudo"...
1
vote
2answers
31 views

change sudoers to stop asking for password when running a systemsetup comman

To what exactly do I need to change sudoers file to prevent asking for password when I change system time zone? This is the command I am going to run: sudo systemsetup -settimezone timezone I know ...
3
votes
1answer
120 views

Can't write to /usr even with sudo

Here's my problem: sudo php -d detect_unicode=0 go-pear.phar ...should let me run as root and modify /usr & /usr/share directories, but I get this: Below is a suggested file layout for your ...
5
votes
3answers
870 views

How does the sudo key symbol work?

I'm trying to write a script that requests the user password for some sudo-related commands. My goal is to emulate the default method that OS X uses to obtain the user's password, Password: followed ...
0
votes
2answers
55 views

prevent networksetup from asking for password

I am trying to get rid of password when changing proxy with networksetup. I changed permissions to read and write of /private/etc folder and propagated change to subfolders. I tried this: sudo chmod ...
0
votes
1answer
105 views

I broke sudo - how do I fix it?

Apparently I can't sudo on my Mac any more. Piers-MacBook-Air:~ piersb$ sudo ls Password: Sorry, user piersb is not allowed to execute '/bin/ls' as root on Piers-MacBook-Air.local. Piers-MacBook-Air:...
3
votes
1answer
396 views

How do I fix this sudo permission issue - UID 503, should be 0 - El Capitan

Whenever I try any sudo command whatsoever in terminal, I get the following error message: sudo: /etc/sudoers is owned by uid 503, should be 0 sudo: no valid sudoers sources found, quitting I have ...
1
vote
1answer
48 views

Errors in installing OpenMPI on El Capitan

I'm following this guide to install OpenMPI on my Mac. I think everything is going well, but now I'm at the step where I have to make all. When I try, I get the error Agreeing to the Xcode/iOS license ...
0
votes
1answer
32 views

How do I revert the sudo less /private/etc/cups/printers.conf command?

I have used the above command to try and find my printer's address using the web. Now I would like to revert this setting using terminal. Can anyone help me with this? Thanks in advance!
1
vote
1answer
37 views

Weird sudo behavior on MacBook Pro

I have a company MacBook Pro. I am sudoer and I can do anything that requires admin privileges when I'm connected to the company network. But I can't when I'm home. How is that possible?
3
votes
2answers
36 views

Sudoers file plist

Using OSX server profiles to configure our fleet of Active Directory connected Macbooks. When our laptops are not connected to the internal network (or via VPN), their AD group membership is lost. ...
-1
votes
2answers
94 views

su and sudo without typing passphrase twice

On the command line, I find that, if I want to administer something, I must first login admin and enter password and then sudo something and enter password again. Is there a way to do this in one step,...
1
vote
0answers
31 views

Getting bash-3.2 everytime I “su”

Whenever I su, PS1 changes to \s-\v\$. Why is that? Tried setting it, but it still changes when I su again, or exit the terminal. What to do?
0
votes
0answers
34 views

The file that cannot be deleted

Today I've been clearing out my hard drive, removing files and applications I no longer need. I deleted a few stubborn files using command line rm. But I've run into a file that resists all my efforts....
0
votes
0answers
113 views

Compiling Ghostscript in El Capitan

I'm trying to compile Ghostscript-9.18 ( i need libgs ) and I've run into the new Rootless Security stuff when I try to install the libs. How do I change the target from /use/include to /usr/local/...
4
votes
2answers
43 views

Allowing sudo privileges, but not access to sites

Is it possible to make it so a user can use the sudo command in terminal, but not have access to sites other then those allowed through parental controls, without a third party system?
1
vote
3answers
121 views

None of my admin accounts are sudo users

I have three admin accounts on one machine running El Capitan. The machine is a few days old. Whenever I try to run a sudo command, I'm asked for my password and told accountUsername is not in the ...
1
vote
1answer
398 views

Operation not permitted “sudo ditto -v to folder /usr/bin”

I'm trying to copy an exec file from my downloads folder to /usr/bin/ using sudo ditto -v sweep /usr/bin/sweep, but the command always fails in Terminal. I even tried to manually drag and drop it but ...
0
votes
1answer
38 views

How do I grant irrevocable privacy from user with sudo access?

In Unix, any user with sudo access can act as any other user using sudo su. This invalidates any imagined privacy of local files for all other users of the same Mac. Is there any (preferably OS-level) ...
0
votes
1answer
534 views

How to install ruby gems without sudo

I want to install a Ruby Gem to my computer, but since I don't have an administrator account I can't use sudo. How do I install a Gem without sudo, and what (if any) privileges do I loose? This is in ...
9
votes
1answer
21k views

Can't write to /usr/lib

I upgraded to OS X El Capitan and tried to install a new app (MPLAB X from Microchip) but I got an error because it couldn't copy a library to /usr/lib even when it asked for root password. I tried to ...
7
votes
1answer
882 views

Terminal becomes unresponsive when a “sudo” password prompt is displayed

When asked to type my password to run a sudo command, the USB keyboard goes unresponsive and I cannot type in the password or anything else. I can hit return three times to bounce out on three failed ...
0
votes
2answers
2k views

sudo: effective uid is not 0, is sudo installed setuid root?

I was trying to remove some folders (python) via sudo rm in Terminal and got this message: sudo: effective uid is not 0, is sudo installed setuid root? I already tried to verify/repair disk ...
0
votes
0answers
133 views

os.Popen command is not working

I'm writing a python script that is suppose to change default display settings for all users. I run the script as sudo because it needs to change every display. This line is suppose to change the ...
1
vote
0answers
77 views

OSX Flush DNS without sudo

I have a Mac that keeps messing up its DNS (this may be a wider network issue, we have windows clients that are having problems too). Whilst I try to understand the DNS issue I'd like to set an 'icon' ...
10
votes
2answers
2k views

How to prevent 'sudo rm -rf /'

A few times I have accidentally executed the command sudo rm -rf /. Is there a way how to prevent me from running this command? For example can I somehow disable it using the sudoers file?
0
votes
1answer
1k views

How to solve “User is not in sudoers file, incident reported”

I added "Syammala Naidu" ALL=(ALL) ALL to /etc/sudoers, rebooted and logged in as Syammala Naidu and run sudo -i. Sudo tells me: user not in sudoers file, incident Reported. How can I fix this?
0
votes
2answers
274 views

Terminal command to arrange all files/folders by name on hard drive

Looking to tidy up my iMac. Like everyone, I have lots of files/folders on my iMac. When they get dragged and dropped, or moved around, they retain their position, and the only way to fix this is to ...
1
vote
1answer
191 views

sudo asking for password even though user doesn't have a password set

I have a computer that doesn't not require a password. I'd like this to continue into sudo, but unfortunately it doesn't recognise a user not having a password. According to Apple the sudo command ...
1
vote
3answers
442 views

Mac OS X administrator account still requires sudo

when trying to install Ruby, Vagrant, and Grunt using terminal I am still required to use sudo on my installs. I am sole proprietor of the laptop and have an administrator account. Shouldn't I be able ...
0
votes
1answer
71 views

Sudo giving dyld problem. Help for a beginner

I am new to using a macbook terminal. Initially when I used the terminal for working on Raspberry Pi everything was great. But now when I try to use the terminal and type sudo it keeps giving a dyld ...
8
votes
3answers
273 views

Is it possible to extend the time i'm logged as administrator when enter sudo mode from the console?

Is it possible to extend the time i'm logged as administrator when enter sudo mode from the console? If yes, how?
4
votes
2answers
11k views

How can I specify shutdown time with “sudo shutdown”?

In the following Terminal command sudo shutdown -r now, there is a time set ("...now"). Is there a way to set a specific time. For example, could it be sudo shutdown -r -int 1200?
4
votes
3answers
4k views

sudo: /etc/sudoers is owned by uid 501, should be 0

To run programs as sudo without password, I edited /etc/sudoers with wrong content. Then I re-edited it with Mac's default text editor(course sudo cannot be used when /etc/sudoers is wrong). I ...
1
vote
0answers
68 views

Terminal 3 failed password attempts

I've got a really funny issue with my Mac at the moment. I was using a sudo command and it rejected my password 3 times (I double checked and the password was correct) but now I can't do anything as ...
1
vote
2answers
4k views

How to open a shell script in a new Terminal window and run it with administrator privileges

I need to programmatically open a shell script in a Terminal window and run it with administrator privileges. I'm using osascript as it displays a convenient prompt for an admin login/password. I'm ...
0
votes
1answer
114 views

How can I run a script or app as sudo with a click?

I have a certain program that doesn't work right unless I run it as sudo. I don't mind having to type in my password, but I'd like to get out of the whole process of opening command line and typing "...
1
vote
1answer
59 views

Access to sudo but not security and privacy or users and groups

How can I add myself to these groups so that I can have access to these areas in system preferences? I have sudo access but I'm not sure how to accomplish this through terminal.
0
votes
2answers
5k views

Opening apache conf file with write permissions

I'm trying to open the /private/etc/apache2/httpd.conf file to make some changes. I thought I'd be able to open this with the correct permissions from the command line, so I tried: cd /private/etc/...
2
votes
0answers
149 views

What is a reasonable command to prompt for sudo password with sudo -A?

My question is definitely related to What option should I give the sudo command to have the password asked through a graphical interface? But my question is slightly different. I know how to use sudo ...
1
vote
1answer
91 views

Rsync fails due to Sudo timeout

I am trying to run a lengthy Rsync (local machine only, no ssh, no lan or wan connects involved) but Sudo is timing out and the script fails. Total runtime of the command is about 20 mins. What is the ...
0
votes
1answer
126 views

I added my username to /etc/sudoers but using sudo still asks for password

I entered my username in the sudoers file, but when using sudo in scritps, it still asks for the password. This is my sudoers file: ~: ls -al /etc/sudoers -r--r----- 1 root wheel 1297 Aug 14 11:...
0
votes
1answer
587 views

How to edit /etc/profile using emacs?

I am using Emacs 24.3 on Mac OS X 10.9.4 and I am trying to edit /etc/profile with that. It obviously does not work when starting the GUI version, but for some reason, it also does not work when ...
0
votes
1answer
746 views

sudo: unable to cache user root, already exists

Suddenly started getting this strange error when attempting to run any command via sudo: sudo: unable to cache user root, already exists I've tried different Terminal windows, repairing permissions,...
4
votes
4answers
2k views

Run GUI Applications from Terminal with root privilege

So it has been well documented that GUI applications (like gedit or textedit) should NOT be run with sudo. Ubuntu et al get gksu and gksudo (and the like) so question: what do WE (Mac users) get? ...
3
votes
1answer
272 views

Super and admin user in OS X

Superuser account is disabled by default in OS X (Mavericks). But if you run sudo -l you will come to know that the admin user can execute all superuser commands. Then what is the point of disabling ...
0
votes
2answers
2k views

Using visudo to edit sudoers on Mac

I have managed to make the sudoers file on my Mac erorr. eg. $ sudo visudo >>> /etc/sudoers: syntax error near line 45 <<< sudo: parse error in /etc/sudoers near line 45 sudo: no ...