Tag Info

Hot answers tagged

4

Just type sudo passwd username to change username's password.


2

Sudo seems to change your environment. You can try to run the command with full path: sudo /usr/bin/tlmgr install Also worth a try is to run sudo with -E: sudo -E tlmgr install


2

You're trying to su to a user who's shell is /bin/false. /bin/false always exits with code 1, so you're never that user: $ sudo su - dnsmasq $ echo $? 1 If you want to start a shell with such a disabled user, use sudo: $ sudo -u dnsmasq /bin/bash $ whoami dnsmasq Note that dnsmasq usually has /sbin/nologin (a politer version of false) as the shell, so ...


2

Here goes oneliner: dpkg -l | grep packagename | wc -l If it results in zero, this package is not installed.


1

To add support for sudoreplay, we need to edit the /etc/sudoers file. For this, execute the following command: $ sudo visudo This would open the sudoers file for us. Then insert the following lines at the end of the file and save it: Defaults log_output Defaults!/usr/bin/sudoreplay !log_output Defaults!/sbin/reboot !log_output It will automatically ...


1

Looks like a script or a command went haywire and appended -src to a lot of debs. You'll have to delete a lot of lines to fix that. Or, to undo this damage, try this command: sed '62,$s/deb-src/deb/' /etc/apt/sources.list Inspect the output and ensure that: -src-src is not seen in any uncommented line (those not beginning with #). A line with deb is ...


1

Try export PATH=/usr/local/texlive/2012/bin/x86_64-linux:$PATH and then tlmgr install. Alternatively, try sudo sh -l -c tlmgr install


1

I'm not sure what the bigger picture is, but your approach should be to run the command with on a file in the directory. E.g. if you want to run grep regex file where file is in /root, then you should approach it like this: $ sudo grep regex /root/file And not: $ sudo 'cd /root; grep regex file' sudo: cd /root; grep regex file: command not found Why ...


1

I think I read somewhere that sudo does not pass along all environment variables on purpose, since that could be used to introduce root exploits (not unlike the recent bash bugs). Or you may need to use sudo with -E -E, --preserve-env Indicates to the security policy that the user wishes to pre‐ serve their existing environment ...


1

There is no undo for sudo. It's a one time root runtime privilege. To better explain its like deleting your Win32 folder for Windows and wondering how to get it back. A simple re-install should fix your issue. I would recommend next time reading MAN on rm to better understand what the command does A simple reading of any terminal command before executing ...


1

Using wildcards in the sudoers file In the sudoers file, you can use wildcards (*), thus creating the possibility to run a script with arguments. An example I tested it with a shockingly simple python script. In the sudoers file I had to use the absolute path to python: /usr/bin/python in the line of the sudoers file: jacob ALL=NOPASSWD: ...



Only top voted, non community-wiki answers of a minimum length are eligible