Hot answers tagged

9

The two processes are sudo on the one hand, and cp on the other. When you run sudo cp source destination & the shell starts sudo with the full command line; then sudo (which runs as root because it is setuid root) checks that you're allowed to run cp like that, and forks and starts cp. So while cp is running you see both sudo and cp processes.


4

PermitRootLogin No doesn't prevent root logins entirely, it only prevents root logins through ssh. Enabling this option prevents a class of brute force attacks where an attacker tries to ssh root@server with some common passwords (including an empty password, which can work if PermitEmptyPasswords is enabled). The point of refusing remote root logins is that ...


4

Your output shows that sync-samuel issues a sudo prompt, even though you run it without sudo and the script itself doesn’t invoke sudo.  This doesn’t make any sense.  It looks like, when you type sync-samuel, you’re running something other than the sync-samuel script that you show in the question. It is possible that sync-samuel is actually an alias for ...


3

On UNIX-like systems, sudo is typically configured to log to a text file. For example, on Red Hat Enterprise Linux systems that is usually /var/log/secure, but it may be configured differently on your system. You should consult your system's man pages for information on how it is configured in your environment. Once you've confirmed your system's ...


3

sudo works with binaries only but not for shell command structures. You have to run the whole thing with sudo. It doesn't make much sense to call sudo several times within a loop. It may cache the password, though. sudo bash -c 'for logf in /var/log/apt/history.log.?.gz; do zcat "$logf"; done'


3

Press CTRL+D to exit out of the password prompt. CTRL+C also works, but which one or if both works might depend on your system.


3

You can ask password by means of GUI prompt with the help of -A, --askpass. From the manpage: -A, --askpass Normally, if sudo requires a password, it will read it from the user's terminal. If the -A (askpass) option is specified, a (possibly graphical) helper program is executed to read the user's ...


2

I think you should be fine. What you've done is drop symlinks for items in /opt/rh/devtoolset-2/root/usr/bin/ into /usr/local/bin/(the location of custom binaries). This is most likely in your PATH variable as well and is most likely prioritized higher (in case you wanted to override something manually). sudo, however, is usually located at /usr/bin/sudo. ...


2

Being unable to change permissions as root on a built-in application or system file on OS X is indicative of System Integrity Protection, a new security feature added in 10.11, which restricts the root account and limits the actions that the root user can perform on protected parts of OS X. Protected parts include /System and pre-installed ...


2

You forgot to state that it is a command alias: Cmnd_Alias REMOUNT = /bin/mount -o remount\,rw /,/bin/mount -o remount\,ro /


1

At the risk of trying to read Todd Miller's mind, I'll just say that sudo is configured to report the hostname in the logging it does, so it has to look it up. See the log_denial function at: https://www.sudo.ws/repos/sudo/file/f19c689a2ded/plugins/sudoers/logging.c


1

You need to add yourself to the wheel group: sudo usermod -a -G wheel $LOGNAME Then GUI would ask for your password, not the root's one.


1

On a technical level, there's no way to tell that the string a program is requesting will be used as a password. On the other hand, there are kdesu and gksudo which are, to a first approximation, "sudo but with a popup window for the password".


1

It accesses the Documents/Images of the user you run it as (if they exist - if that user has no home, then it may not work, browsers usually store some data in home, such as the profiles and stuff). Otherwise, the answer is yes. No regular user can (as per usual permissions on home folders) access homes of any other users, or change system files. The ...



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