3
votes
2answers
44 views

Practical (closest to the classical Linux one) way to use (automate) SUDO for CygWin

Being able to use sudo commands in CygWin is useful, and faster than opening an elevated shell: Luis@Kenobi /cygdrive/c/Users/Luis $ net user /add TestUser System error 5. Access denied. Luis@Kenobi ...
3
votes
1answer
14 views

Ubuntu Linux sudo groupadd option menu keeps showing

I'm a beginner to Ubuntu and Linux. Every time I try to do a groupadd in my Ubuntu terminal the options for groupadd show up and I dont know why. I enter this in my home directory: sudo groupadd –g ...
0
votes
1answer
444 views

Running commands as another user on their machine via ssh?

As part of my normal workflow I ssh into another user's machine, switch user to them, run a command, then exit out to my own machine again: ssh hostname sudo su user runcommand exit exit Is there a ...
1
vote
5answers
159 views

Pre-authorise sudo? (So it can be run later)

I often set my work computer running some time-consuming computations before I go home in the evening. After they're done, I'd like it to shutdown. However, as shutdown requires root privileges, it ...
1
vote
0answers
94 views

After rebooting, why doesn't sudo prompt for password when I try to start MySQL server?

I'm having a minor problem, and I'm hoping someone can help me understand why my system behaves this way. By the way, I'm a MySQL + Terminal newbie, so please go easy on me! I've done some due ...
0
votes
1answer
55 views

All the command line command become “Not found” after installing Mountain lion

I just found after installing new Mountain lion, I can no longer use the command line because all the command seems to be " NOT Found", even for basic "sudo" command sudo: command not found How can ...
2
votes
3answers
541 views

sudo to kill output of ps, awk, xargs

I want to kill root owned processes containing foo in the process name sudo sh -c "ps aux | grep [f]oo | awk '{print $2}' | xargs kill -15" this command fail as awk and xargs are ignored. sudo sh ...
1
vote
2answers
616 views

Does sudo really make you root for a little while?

On Linux, in what kind of situations, if any, running a command as a non-root to access a file/folder or create/delete a file/folder using sudo may result in "permission denied" while running the same ...
1
vote
1answer
637 views

admin group disappeared; cannot groupadd

Okay, so this is embarrassing, but I seem to have lost the admin group on my machine, though I would have sworn I hadn't gone anywhere near it. I'm running Mint Maya. Trying to innocently sudo this ...
1
vote
1answer
732 views

What does 'sudo -iu someusername' mean? What does it mean for scp-ing files up?

I'm having a communication problem with my IT department, and as a newb with terminal, this is really frustrating because I can't understand why I'm doing the things I'm instructed to do. All they're ...
5
votes
2answers
393 views

Feedback when typing password at a sudo prompt

When I type in my password at a sudo command line prompt, I would like to see a "*" for each keystroke. How do I do this?
0
votes
1answer
721 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 ...
2
votes
3answers
6k 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 ...
2
votes
2answers
894 views

Sudo and Bash Script

If I call a bash script with sudo, for example: sudo bash script.sh Do I still have to use sudo inside the script in cases like this: sudo apt-get update
3
votes
1answer
2k views

What's the difference between sudo su - and sudo -i?

It is my understanding that they do the same: they ask for my password (if I am allowed in /etc/sudoers), and give me a login shell as root. Is there any difference between them? sudo su - sudo -i ...
0
votes
1answer
735 views

sudo broken. Unable to enter recovery mode to fix it

I broke sudo when I wrongly edited a file in /etc/sudoers.d in vi(did not use visudo :-(). I read that I could fix the same by rebooting into the 'Recovery Mode' by selecting the same from the grub ...
1
vote
7answers
305 views

Is there a BSD equivalent to “!!”?

I often find myself issuing a command that I do not have the proper elevated privileges for. On Ubuntu I could use sudo !! This would issue the same command with sudo privileges. Is there an ...
29
votes
2answers
4k views

What does the command “sudo !!” mean?

I saw the command sudo !! in a video. What does this mean?
0
votes
3answers
1k views

Script to use sudo in a terminal, gksudo otherwise?

I'd like to write a script that does an administration task, and I would like to be able to run it either from a terminal or not. If it runs in a terminal, even a graphical one, I'd like it to ask for ...
1
vote
1answer
1k views

symlink and sudo executable

If I have the below sudoers entry usera ALL=(userb) NOPASSWD: /home/userc/bin/executable-file usera ALL=(userb) NOPASSWD: /home/userc/bin/link-to-another-executable-file When I log-on as usera and ...
26
votes
5answers
21k views

scp to remote server with sudo

I have a file on server A (which is behind a NAT so not directly addressable). The file needs to be copied to server B in a directory restricted to root. I have an account on server B with sudo ...
46
votes
2answers
10k views

How to append to a file as sudo? [duplicate]

Possible Duplicate: sudo unable to write to /etc/profile I want to do: echo "something" >> /etc/config_file But, since only the root user has write permission to this file, I can't ...
6
votes
4answers
3k views

Changed sudoers file and cant open it anymore; cant open any file using root

I changed settings in sudoers file using sudo visudo and messed it up. Now when I try to do it again or open any file using sudo, I cant open it anymore and I get this error message, >>> ...