Tag Info

New answers tagged

0

I know this is old, but in case anyone googles this and finds it.... Configure your own .bashrc as you like (~/.bashrc) Then when you need to use sudo, do it like... sudo -E command -E tells the superuser to preserve the current environment


1

I've been bitten by passwordless sudo once. It was a shell script, some installer which called sudo on my behalf as opposed to, you know, actually requiring sudo or erroring out. Imaging typing 'make' and the script doing the 'sudo make install' part for you, without setting or displaying the base path, and the script being so braindead in the first place ...


0

sudo apt-get install -y postfix 2>&1 |tee sudo cp ~/siteconfig/etc/postfix/main.cf /etc/postfix 2>&1 |tee


2

Try sudo -i ./test.sh. I don't know if there's there a specific need for having the colour coded string in a separate file then writing it out to another one, but the following works fine withou the -i flag: #!/bin/bash string="\e[1;34mTEST\e[0m\n" printf "${string}"


2

You are missing a '%' in the example posted. It's supposed to be %wheel ALL=(ALL) ALL not wheel ALL=(ALL) ALL


2

There is an outstanding bug report about this: Debian Bug report #728775 - apt-get unwarrantedly consumes input. The report says: When apt-get is invoked in a way that involves actually installing a package, it reads any available data from standard input, regardless of actual need. This breaks the usual ability, at an interactive shell, to type ...


9

Can't say for sure why it happened. If your sudo rule was based on your user being part of a specific group (e.g. wheel or sudo) and you were removed from that group that would explain it. You shouldn't need to blow your instance away, but you will need to stop it (not terminate) and attach the disk to another instance where you have root access so it ...


0

Do you have sudo access from your user account? SSH to the box, login and type sudo -i If you can get in, you are now there as root using your credentials. You can then change the password. Give that a try?


0

You cannot change your password due to the filesystem being mounted in read-only mode when booted into Ubuntu's recovery system. See this AskUbuntu answer for more detail, but you will need to run the following command to re-mount the filesystem as read/write: mount -rw -o remount / After remounting, the output of the mount command should look similar to ...


0

Just curious to know if you can ssh as a root user? If so, try resetting the /bin/su permissions to root:root!



Top 50 recent answers are included