execute a command as another user

learn more… | top users | synonyms

8
votes
6answers
19k views

How do I open a file as root in TextEdit on Lion?

How do I open a file as root, in TextEdit? I've tried these commands as root, but TextEdit always say it's locked: open -e /etc/apache2/httpd.conf open -e -F /etc/apache2/httpd.conf open -e -F -W ...
1
vote
2answers
2k views

Terminal returns not found for most commands Mac OSX

I'm really new to Mac OSX and UNIX based systems. I wanted to run a few Windows games on my Mac Mini so I started installing Wine and MacPorts. Having done so, I typed in sudo port install wine and ...
11
votes
4answers
7k views

Can sudo's annoying message be removed from Mountain Lion 10.8.0?

After the upgrade to 10.8.0, whenever I do a sudo, I always get this message: dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/sudo) is setuid or setgid I have ...
3
votes
5answers
22k views

How do I reset/recover my superuser password without the boot disk?

I lost the superuser password for my iMac and I don't have the boot disk. I already tried the second answer on this page, but every time I type su from the command prompt, it still asks for a ...
1
vote
2answers
163 views

Is there a way to set an Application Shortcut in the Keyboard Preference Pane via Terminal?

I'd like to have a bootstrap for my custom keyboard shortcuts to use on multiple machines...
3
votes
3answers
4k views

How can I execute sudo commands as a cron job?

I'm trying to execute a shell script as a cron job. The problem is that my script needs to be run as a super user. I tried it with just writing sudo infront of the command in my crontab file, but it ...
0
votes
3answers
2k views

Issue installing MacPorts on Mavericks

I try to install MacPorts and get this $ sudo make install make: getcwd: Permission denied shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied ...
0
votes
0answers
377 views

Mac asking for password for some files when deleting [duplicate]

This happens not for all files. When I move or delete some of the files on my external drive Finder will ask for password. Is it due to permission set on these files ? Can I use something like Sudo ...