0
votes
1answer
36 views

How to enable sudo commands over SSH without asking password?

I have server A and server B (both Ubuntu 10.04 LTS) doing different tasks. Server A needs to poke Server B, which generates a file and scp's it back to server A when done. This is all in-house and I ...
0
votes
0answers
30 views

How can I automatically save a list of open files in Geany, with cron or otherwise?

I use the Geany IDE for programming, and it does not reliably reload my previously open files, for example after a power outage. I found that Geany has a command line feature which returns a list of ...
0
votes
0answers
18 views

autologin to root user with .cshrc

How do we cause login cshell to automatically execute sudo su - when a user first ssh into the linux box from Windows putty ? We tried putting this line sudo su - in .cshrc file but it is never ...
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 ...
1
vote
2answers
45 views

Trying to enable passwordless sudo

I want to enable passwordless sudo for user "bamboo" on my host, so I have added bamboo ALL=NOPASSWD: ALL and also %admin ALL=(ALL) NOPASSWD: ALL (user bamboo is in the admin group) to the ...
3
votes
1answer
49 views

Why does redirection fail when passing through ssh, sudo and sh?

After reading this question, I know that I have to do sudo sh -c 'ls -hal /root/ > /root/test.out' to avoid the "Permission denied" error. But when I do ssh hostname sudo sh -c 'ls -hal /root/ ...
0
votes
1answer
46 views

how to run a program with root privilege in a remote linux host

I want to run a program on many remote hosts these program may run serveral hours and it needs root privilege I have uploaded the program to those remote hosts I can only ssh into those machines ...
0
votes
3answers
52 views

What types of users can I use with “sudo”?

I thought you could only use sudo to temporarily become root: sudo vim /etc/resolv.conf But recently I saw a shell snippet depicting a user using sudo to become a specific user: sudo -H -u devops ...
1
vote
1answer
53 views

how to correct sudo permission

I'm running AWS EC2 Micro instance and had issues getting permission to the root access with EC2-user. Followed a tutorial online and ran the following commands: sudo chgrp ec2-user /etc sudo chmod ...
0
votes
2answers
70 views

run command with root privileges as nonroot user

I want to set up steam to run automatically with a higher than default priority, which involves starting it with nice. But to set a priority lower than 0, I must be root. Problem is that steam doesn't ...
0
votes
1answer
62 views

How to config sudoers file?

I'm using ubuntu server 12.04 LTS I want to know how to configure my sudoers file (obviously, using visudo), to permit an user to run commands like root (doing something like "sudo service x ...
0
votes
1answer
26 views

Prevent SUDO from executing passwd

How can I prevent the users from executing passwd using sudo on Linux?
1
vote
2answers
138 views

sudo to run command as different user

I am trying to setup a script that will be run as a "maint" user. The script is basically a menu that allows maintenance personnel to do different things on the server. However, some of the scripts ...
0
votes
3answers
90 views

Is Windows vulnerable because its sudo equivalent does not require a password? [closed]

On Windows from Vista and onwards, you have to press through an UAC dialog to perform something that requires admin rights like installing or uninstalling programs. On Linux to become root, you have ...
5
votes
1answer
114 views

Two password (factor) authentication to root user / sudo

With regards to running Linux remotely (SSH) I'd like to employ two levels of authentication for accessing the system with root privileges. I have the root account disabled / locked out so direct ...
0
votes
2answers
101 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 ...
-1
votes
2answers
56 views

I can su to root, but sudo <command> fails

I am running Centos 5.3 and I can su to root fine. However when I run a command as another user like: sudo ls, the system says incorrect password for the same password. Why is this happening? Thanks. ...
1
vote
3answers
192 views

Why can I kill a sudo process on Xubuntu but not Linux Mint? (as a normal user)

I have two computers, one running Xubuntu 12.04, and the other running Linux Mint 14. On Xubuntu: $ sudo gedit in another terminal: $ kill [pid of the gedit process] bash: kill: ([pid]) - ...
1
vote
1answer
112 views

Edit sudoers to allow /sbin/ifconfig down with NOPASSWD

I'm trying to edit /etc/sudoers so that I can execute a bash script with a root password. so far every edit I've tried to sudoers is not working. I've tried adding each of these lines: %admin ...
0
votes
1answer
71 views

Expect and sudo timeout

I have a main shell script that prompts the user for his password. I then would like to call an expect script while passing the password to it. This expect script will run 3 sudo commands. I know the ...
0
votes
2answers
79 views

running script containing sudo in cron

#!/bin/bash value=$(<man.txt) echo "$value" if [ "$value" == "true" ]; then echo "startedif_manthan" ps -ef|grep sym |awk '{ print $2 }'|sudo xargs kill -9; sleep 30; sudo sh ...
0
votes
1answer
48 views

Passing User's aliases to root while doing “sudo su”

Is it possible? I could make an alias to sudo su -;source .bashrc but it seems like source .bashrc is executed in the earlier shell and not in root's sheel (Why?)
0
votes
3answers
311 views

Execute a command with root permissions as normal user

I want to execute a command as if I am my normal user, but I want to have root certain permissions. In particular, I have created a phyiscal VirtualBox drive that I want to use as a normal user. I ...
1
vote
4answers
331 views

“Wrapper” ssh script freezes when executing remote command

I am running OSX Mountain Lion and the remote server is CentOS 6. I have several scripts on my local machine that I want to run on the remote server and to that end, I thought to write one script that ...
0
votes
1answer
455 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 ...
5
votes
2answers
206 views

Shutdown Ubuntu Command

What is the command or application that allows a user to shutdown the computer from gnome. And how does it have privileges while halt requires superuser?
0
votes
2answers
36 views

How can I run commands like setfsuid, setfsgid as a normal user?

Normally only the root user has permission to run these commands. Is any way I can run these as a normal user?
1
vote
1answer
93 views

Set default editor for crontab -e invoked with sudo

I'm using Bash on Debian Squeeze. I just read this topic: change default text editor for crontab to vim I have exported both variables VISUAL and EDITOR to vim for normal user and for root. And this ...
0
votes
2answers
70 views

Why does redirecting “sudo echo” stdout to a file not give root ownership?

I'm pretty new to using Linux heavily, and I'm trying to learn more about file ownership and permissions. One thing that I stumbled on just now was exactly what the title says, running: ...
2
votes
1answer
641 views

sudo + x11 application does not work correctly

I couldn't get any program requiring x11 (e.g. gedit, nautilus) to work with sudo. Using gksudo would just fail silently, while on terminal I received the following error: sudo nautilus ** ...
0
votes
0answers
50 views

Weird behavior of sudo

I use putty to log in to a remote LINUX machine. (Ubuntu 10) When I log in I have to authenticate myself, that goes on pretty smooth. Whenever I try to use sudo or su though, I experience ...
5
votes
2answers
353 views

How can I properly set sudo/visudo's editor?

I am using Ubuntu 10.04 Server and trying to set up sudoers to respect a user's EDITOR choice (within limits) In my sudoers I have: Defaults editor=/usr/bin/nano:/usr/bin/vim Defaults ...
0
votes
1answer
59 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).
4
votes
2answers
98 views

Automatically execute bash script under the privileges of another user

Is there a way to execute a bash script under the privileges of another user (automatically)? I think "sudo" is the right way, but I don't know how to automate the process. E.g. I want to run ...
1
vote
2answers
302 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 ...
4
votes
1answer
143 views

Keeping the fancy sudo warning forever

The first time I do sudo on openSUSE I'm always warned with a someway fancy message We trust you have received the usual lecture from the local System Administrator. It usually boils down to these ...
1
vote
3answers
133 views

Grant permission to output redirection with sudo in Linux

I try to put value "1" into some virtual file of /proc, and I get "permission denied" despite using sudo: name@comp-name:/etc/dhcp$ sudo echo 1 > /proc/sys/net/ipv4/ip_forward bash: ...
2
votes
2answers
368 views

sudo, runuser, su don't work as I expect when run as root with command as “echo $HOME”

When I run these commands it outputs as shown. /root sudo -u someuser -i "echo $HOME" /root runuser -l someuser -c "echo $HOME" /root su - someuser -c "echo $HOME" /root What i expected was ...
0
votes
1answer
84 views

Why does a new terminal get automatically closed?

Every time I open a new terminal it gets automatically closed. I'm running Arch Linux, and Xforce4 terminal. $ terminal --execute sudo arpspoof -i $(cat var.log|awk '{print $1}') \ -t ...
0
votes
5answers
41 views

My user information was deleted [duplicate]

Possible Duplicate: Undo an “rm -rf ~” command? So I made a stupid error, I did a sudo rm -rf of my ~/ directory. I wasn't thinking of the hidden files in there. Now instead of showing what ...
1
vote
2answers
197 views

sudo without password when logged in with SSH private keys

Is it possible to make sudo command to support SSH private keys, so that when the user logins using a private key then he/she could sudo without typing a password. This would allow storing the UNIX ...
0
votes
2answers
71 views

Is there any risk ing giving a webadmin sudo access

I have a normal user on my system who needs to have write access on httpd.conf. If I have the following entry in my sudoers file: joe ALL=(ALL) /usr/bin/vim /etc/httpd/confs/httpd.conf Is there any ...
2
votes
1answer
438 views

Bash: permission denied for file write

I followed this tutorial guide on "How to Create Linux Proc Files in C Program using LKM". I've successfully made my module and loaded it in. Now I want to echo to my proc file to make sure the ...
0
votes
1answer
215 views

Ubuntu, User Accounts messed up

I need to fix Ubuntu Accounts somehow but I don't really see how it could be done. The problem is: files /etc/passwd and /etc/hostname and /etc/hosts where changed. /etc/passwd Before ...
6
votes
1answer
161 views

Why sudo is needed for rebooting in terminal but not from the GUI?

When I turn on my machine and I log in to my account I can do whatever I want and even shutdown my machine or say reboot. But if I open terminal and try to run the command reboot or shutdown then I ...
5
votes
1answer
861 views

Can't write to file /sys/class/backlight/acpi_video0/brightness (ubuntu)

I am trying to change the brightness by overwriting the value on this file: sudo echo 5 > /sys/class/backlight/acpi_video0/brightness -bash: /sys/class/backlight/acpi_video0/brightness: Permission ...
3
votes
2answers
145 views

Force sudo to ask for password once from outside sudoers

I'm trying to hack together my own Android app that opens an SSH connection to my computer, and sends commands. I am aiming to keep the interactivity of this process to a minimum, to make it have the ...
3
votes
3answers
676 views

Lost permission to use sudo commands

I changed /etc folder permission to 711. After doing that, I lost the permission to use sudo commands. Any way to change the folder permissions back? What I have tried so far: 1) use su -, ...
0
votes
4answers
78 views

how to access homedir by root user

I want to access root user's home directory /root/. However following commands dont lead me to the root directory. sudo -s cd ~ It leads to the home dir of regular user. How to access /root ...
0
votes
0answers
133 views

Sudo does not work with some commands on CentOS (with cpanel)

I have a fabric deployment script which uses sudo heavily. It runs about 20 commands using sudo without any problems and then choke on the last two commands: ln -sf /path/a /path/b chown -R ...

1 2 3