I'm trying to set up a build environment using chroot, but instead of downloading ubuntu base files, I want to use my live / as base files for the chroot and use c-o-w to redirect any changes made in the chroot to other folder.
When I tried to "sudo su" instead of "sudo su -" after having been logged in as root and su-ing to another user, it tries to sudo me as the new user, but via root...
When I type env, it shows still username=root in the environment. Is sudo not looking at the currently logged in user, but at the enviroment parameters?
There is a recent question regarding multiple sysadmins working as root, and sudo bash -l was referenced.
Hi,
I have installed sudo on Solaris 10 (sparc). When I try to add a user I get the following:
----------------------------------------------------------
-bash-3.00$ sudo addusr scarlet sudo
sudo: /usr/local/etc/sudoers.d is owned by uid 2, should be 0
Password:
-----------------------------------------------------------
I entered a password, thinking it was for the sudo user but it failed.
I visudoed sudoers to allow a user to run one bash script with a passwordless sudo, which works fine when logged in (also via SSH). However, when I log in via SSH using public key authentication and configure authorized_keys' command="sudo myScript", I am promped for the user password by sudo. Having the script itself use sudo on another program does however work without requiring a password.
I am getting the dreaded sudo: must be setuid root error even though the executable in /usr/bin/sudo has ownership root:root and mode 4755 (-rwsr-xr-x). /etc/sudoers is mode 440. My user is in sudoers with all appropriate settings. I've purged and re-installed the package, to no avail.
I didn't initially configure this machine; its upkeep has fallen to me by default.
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
Hellow,
i just did a fresh install of ubuntu 12.04 - 32 bit on my vps.
then i created a new user and added it into "sudo" group to allow sudo permission. then i tried to sudo to see whether it works or not. then i got "sudo: must be setuid root" warning. after googling for sometime i found out that /urs/bin/sudo file must be given chmod +s permission to make sudo work.
On a regular linux machine, when I use sudo -s as a normal user, I become root but HOME still points to ~user, so every admin has his own environment etc. (this is without env_reset or always_set_home set).
On a system where the home directories live on an AFS file system, this also works, if the environment variable KRB5CCNAME is preseved, as root can read this file in /tmp.