1
vote
0answers
18 views

Copy a local file to a remote server, non-root privileges over sudo?

I'd like to do something like: scp local_file remote_server:/some_directory But in order to gain privileges to /some_directory, we need to call sudo. I know that a similar question had already been ...
5
votes
3answers
185 views

Why do I need a tty to run sudo if I can sudo without a password?

I have configured sudo to run without a password, but when I try to ssh 'sudo Foo", I still get sudo: sorry, you must have a tty to run sudo. Why does this happen and how can I work around it?
2
votes
0answers
52 views

program needs to be run as root by any user and can be located anywhere

I have some program called foo that needs root privileges when it executes. foo needs to be able to be run by any user and can be located at any path. The reason this program can be at any path is ...
0
votes
2answers
20 views

How to create a directory which will have access to the user who is installing a package?

I am packaging one of my projects on Debian. The project expects a directory to be created at XDG_DATA_HOME or ~/.local/share/ where the data files will be kept. Now I am trying to create and feed the ...
0
votes
1answer
37 views

I had a folder full of files, then I used “sudo mount” to mount a Windows samba share. Where did the files go? [duplicate]

I'm using a raspberry pi. I didn't think mounting a samba share to a folder full of files would do anything - I thought it would copy the files to the samba share. Now the files are gone from this ...
0
votes
0answers
45 views

running a command as a less privileged user: `sudo -u` vs `su` being run as root

in an startup-script that is typically being run as user root, i would like to start a program (actually, a server) as a less-privileged user. the script originally used su -s /bin/sh -c ...
0
votes
1answer
46 views

Change sudo and root password on Debian

I have sudo access, but I don't remember the sudo or root password; how do I change it from my limited account using sudo?
1
vote
3answers
137 views

Why is the 'sudo' password different than the 'su root' password

On my personal machine, I often type sudo in front of certain commands in order to accomplish administrative tasks. I had hoped to avoid doing this throughout the day, by typing su root and providing ...
1
vote
1answer
291 views

ssh with sudo doesn't start services

I want to run command with sudo through ssh without disabling "requiretty" sudo option. According to /etc/sudoers: # # Disable "ssh hostname sudo <cmd>", because it will show the password in ...
2
votes
1answer
147 views

Broken sudo on amazon web services ec2 linux centOS

So I had no idea of the dangers of messing with the /etc/sudoers file, and was just trying to make a simple change in there. However, I seem to have put something with incorrect syntax in there, ...
2
votes
2answers
52 views

What alternative backends does sudo support and how is it configured?

When preparing for the Red Hat Certified Engineer certification examination, I came across this quote in my study notes about the sudo command. By default, the policy is maintained as a flat text ...
1
vote
3answers
91 views

Confused on user and su in linux

How could I run a script as a specific user (non-root)? As this? sudo su - john /usr/share/script.pl for user john?
3
votes
2answers
131 views

insert text in a file using echo command [duplicate]

I am trying to insert some text in a file in the following way sudo echo "abc-abc/abc/abc" >> /etc/portage/make.conf but it give me the error Permission denied although I am using sudo ...
0
votes
1answer
105 views

Are there any Linux distros that protect against “self-mutilation”? [closed]

Over the past week I have installed and reinstalled Linux several times (Mint 15 in all but one case; Ubuntu 13.04 is too slow on my laptop), and after a mishap with QT today I completely gave up in ...
0
votes
1answer
121 views

Execute remote programs and completely detaching it

I need to execute a remote application (named ConnectionManager), which uses the ncurses library, on the remote server launching it from a local pc. ConnectionManager is a program wich use ncurses ...
6
votes
2answers
760 views

/etc/sudoers - Insults - How to add a list of insults?

I intend to play with the linux insults and add a few. However, i only could figure how to add a single insult but not a list or the location of the file that contains the insults.
0
votes
1answer
241 views

Difference between sudo su - user and sudo -iu user [duplicate]

I was wondering if there were any difference (in environment ?) between doing sudo su - user and sudo -iu user From what I know: By using sudo su - user I open a new shell as user, and the ...
2
votes
2answers
2k views

Linux (RedHat) `sudo su -l <<user_acct>>` does not source profile

As stated, having trouble with loading the default profile of <<user_acct>> when doing sudo su -l <<user_acct>>. Inside .profile, if [ -r "${HOME}/.profile.custom" ]; then ...
3
votes
2answers
11k views

How to add self to sudoers list?

I've added myself into the sudoers users list by using the command root@debian:/home/oshirowanen#adduser oshirowanen sudo If I try to run that command again, root@debian:/home/oshirowanen# ...
0
votes
2answers
1k views

Changing root password does not change sudo password

I'm trying to change the password that get's asked when doing sudo. I'm in Ubuntu. Doing 'sudo passwd' or 'sudo passwd root' does give me the two new password questions, and it successfully changes ...
2
votes
4answers
2k views

Should I use `sudo` or `su` in a startup script?

I have a personal program, that has a server/client design. The server daemon part of it, should be run as its own limited user, and the program was not designed to drop its root privileges (if ...
1
vote
1answer
445 views

Passwordless sudo of a command containing a comma

I have a number of users of a desktop machine, who each have a folder on a remote samba server. I am trying to set up per-user mounting of these network folders following the instructions here: ...
6
votes
1answer
2k views

sshfs mount, sudo gets permission denied

I am using sshfs to mount a folder with some python projects over ssh to my ~/ directory. $ mkdir -p ~/mount/myprojects $ sshfs user@myserver:/home/user/myprojects ~/mount/myprojects I can perform ...
2
votes
1answer
475 views

Sudo does not work in chroot

I would like to be able to use the sudo command in a chroot environment. I start the chroot as follows: chroot /debian-squeeze /bin/bash Now I'm logged in as root in the chroot. I can do su user ...
0
votes
3answers
463 views

How do I execute a newly installed application with Sudo?

I have just installed an application on my Amazon EC2 instance called sshpass. I am having trouble getting it to work properly ( although, it works correctly on a non AWS instance ). I've read in ...
1
vote
3answers
1k views

Root permission - username ALL=(ALL) ALL does not work

I'm a beginner. I'm trying to give my user root permissions, so I edited the sudoers file like this: black ALL=(ALL) ALL "black" is my username. But I still don't have root permissions, and ...
0
votes
3answers
79 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
4answers
134 views

Trying to setup sudo user

I'm trying to setup sudo with no password but still I get prompted for password. I'm using Ubuntu, here is the relevant line from the sudoers configuration file : gandalf ALL=(ALL:ALL) NOPASSWD: ...
3
votes
4answers
3k views

Allow non-admin users to install packages via apt or rpm?

Is it possible to allow non-root users to install packages system-wide using apt or rpm? The place where I work currently has an out of date setup on the linux boxes, and admins are sick of having to ...
17
votes
2answers
2k views

How does sudo remember you already entered root's password?

When using sudo on Linux, it asks for root password, but only the first time you run it. If you run another sudo command, it remember you already entered the password previously and doesn't ask for ...
0
votes
4answers
5k views

Is there a difference between sudo su - root and sudo -u root -H /bin/bash?

Like title says, is there a difference between these two commands : sudo su - root sudo -u root -H /bin/bash I'm using GNU/Linux, if that makes a difference.
1
vote
2answers
406 views

start apache script

I've got Apache installed on my local Linux (sabayon) OS, just for programming testing. What I want is a script so that the server starts right away when I want it. This is the code: #!/bin/bash # ...
2
votes
1answer
448 views

Software installation with GUI package installer using sudo permission

I have the sudo permission, and I can install any software using the CLI. But I want to know that whether sudo works with package installers in GUI mode. For example I have a .chm file and I want to ...
2
votes
1answer
400 views

How to create a sudo user that cannot delete me?

I'm sudoer on a remote linux machine and would like to create another user with the maximum privileges, except the privilege of managing my account. I'm assuming a sudoer can delete or change the ...
3
votes
1answer
266 views

How to use SCSUDO to run scripts with positional parameters?

I am trying to use scsudo to run a number of defined commands to stop and start processes on a UNIX host. The issue I am experiencing is that scsudo does not seem to like the use of positional ...
11
votes
6answers
7k views

Is there a way to stop having to write 'sudo' for every little thing in Linux?

I'm a newbie when it comes to Linux. I do most of my development in a Windows environment. That said, I'm going to be doing a fair amount of PHP work shortly, and I'm interested in learning RoR, so ...
0
votes
0answers
295 views

Why do you need sudo for “sudo su root”? [duplicate]

Possible Duplicate: When do su and sudo use different passwords? Why do you need to use sudo su root ? Why won't it work to just use su root?
3
votes
4answers
951 views

Detach a daemon using sudo?

I noticed that sudo continues to run after executing any of the following lines. Is there any way to detach the daemon completely so sudo does not continue running? sudo -u user daemon & sudo -u ...
2
votes
4answers
568 views

sudo without password - security? [duplicate]

Possible Duplicate: What specific vulnerabilities am I creating by disabling the sudo password? I'm involved yet again in the old argument on whether sudo without password is secure enough ...
4
votes
2answers
706 views

Run Python Portio script as normal user without root access

I know there are risks running a root script as a normal user, but in this case I don't have a choice and what I am doing is machine related. I have an Small Board Computer that has GPIO ports and I ...
11
votes
2answers
4k views

What is the proper sudoers syntax to add a user?

According to the comments in /etc/sudoers (Fedora 13): ## Syntax: ## ## user MACHINE=COMMANDS ## ## The COMMANDS section may have other options added to it. My two related questions: What ...
5
votes
4answers
1k views

How sudo/root-ness detection works

Programs that make changes system-wide require sudo unless I am already the root user. Now, the question is: how exactly does the system figure out that I am (not) root? Does it: Check to see if ...
2
votes
2answers
537 views

How do I reset ownership on /usr/bin/sudo on centOS? [closed]

I accidentlly changed ownership of /usr/bin/sudo to my current user (i also did this for some other stuff in my /usr directory). I can't change any of them back because I need ownership of ...
0
votes
3answers
3k views

sudo does not allow me to run cp

Executing the following command on a CentOS 5 box sudo cp file1 file2 gives me the following error: Sorry user my_username is not allowed to execute '/bin/cp file1 file2' as root on site_name.com ...
7
votes
3answers
2k views

Why does my sudo ask for password only once but evaluate thrice?

$ sudo some_command Password: Sorry, try again. Sorry, try again. Sorry, try again. sudo: 3 incorrect password attempts $ This is what my shell prints when I enter a wrong password to a sudoed ...
7
votes
2answers
1k views

Once sudo su'd to root, is there a command to see my username?

I have sudo rights on a redhat box; once I've "sudo su -" to become root in a shell, are there any commands I can run to see what username I su'd FROM?