3
votes
0answers
33 views

Booting a Raspberry Pi from an NFS share

I am trying to boot my Raspberry Pi using an NFS share. I have copied the boot partition of the Raspbian Wheezy image to the SD card and copied the root partition to a networked hard drive. I have ...
4
votes
1answer
92 views

How safe is sudo when running from root to run an application as a less privileged user?

Lets say I am logged in at a root terminal and I run something like the following command: sudo -u '#1000' dbus-launch chromium Are there any potential security issues I should be worried about? ...
5
votes
1answer
317 views

I changed /etc/sudoers, and now I can't run as sudo

I messed around with the sudoers file without really knowing what I was doing using this link. Assume I did everything that was in the top answer along with editing it with vim and not visudo. How do ...
1
vote
2answers
54 views

Why does it take more time for a login to fail than to succeed? [duplicate]

When logging in to my PC, and the password is correct, the login takes place nearly instantaneously. When the password is wrong, it takes a few seconds of waiting until the hint "The password is not ...
1
vote
3answers
72 views

Wrong Permission to /etc folder [duplicate]

I have given the wrong permission to the /etc folder chmod -R 777 /etc When I want to login as root it gives me an error and the following output. How can I correct the permissions? ...
2
votes
1answer
59 views

Root Password Policy and Refresh

Unfortunately the infrastructure I work in has static root passwords that are very rarely refreshed. So people leaving the company will have our root passwords and it can potentially be leaked to ...
2
votes
1answer
100 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 ...
10
votes
3answers
3k 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
76 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
30 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 ...
-1
votes
1answer
60 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
79 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
96 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
456 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
399 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
184 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
54 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
95 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
195 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
112 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
136 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
973 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
342 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
13k 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
2k 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
562 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
4k 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
568 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
529 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
2k 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
80 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
140 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
4k 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
3k 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
7k 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
479 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
526 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
402 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
270 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
9k 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
297 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
1k 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
597 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
818 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
592 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 ...
1
vote
3answers
4k 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 ...