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 to log in as a user named user.
Whilst attempting to install some tricky software (for astronomical data reduction) I hit software installation problems running as sudo. I therefore tried the same thing running as my normal user, after modifying the permissions of /usr:
chmod -R 777 /usr
This was intended to be a temporary mod and seems to have been a bad idea.
i screwed up big time.
In the terminal, I entered
sudo deluser myself sudo
and
sudo deluser myself admin
Why do I still have root privileges under this user?
I made a new user and added it to "sudo" and "admin." I want to have someone else set the password for it, so I can lock myself out of the hosts file when URLs are blocked.
sudo does not work.
I have installed Arch onto a USB key, using BTRFS.
The output of "sudo" is:
$ sudo
sudo: unable to stat /etc/sudoers: Permission denied
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
$ ls -l /etc/sudoers
-r--r----- 1 root root 2849 May 18 15:00 /etc/sudoers
$ lsattr /etc/sudoers
--------------- /etc/sudoers
$ strace -u ross sudo true
Hi all, I tried the method mentioned by harlekin and it works. The website that I googled describing this is:http://www.shellperson.net/using-sudo-with-an-alias/Just make sure you have the space in "sudo ".
Possible Duplicate:
Redirecting stdout to a file you don’t have write permission on
I'm quite new to Linux and I have a permissions questions. I'm using Linux Mint.
If I go to /opt and do a $ echo hi > file it says permission denied.
If I try with sudo, like this $ sudo echo > file it says permission denied.
Isn't sudo to execute the command as superuser?
Sudo returns this error:
sudo: effective uid is not 0, is sudo installed setuid root?
And su - returns this:
su: Authentication failure
The user I'm using is a member of the following groups:
disk wheel locate network video audio optical floppy storage power users
I can log in to root, but can't elevate my user privileges, and I'm sure the password I'm giving to both is correct.
Hello, I have a regular user account that needs to run a script as a cron job. This script is to check whether or not a file exists, and if so, perform an action on that file using sudo (the file is owned by root).