bash

Keeping access to SSH Agent using sudo

When sudo into another user, sudo will strip the environment for security reasons. When trying to do root actions that require ssh keys, all access has been lost.

For the root user, these can be kept without caveats because they have access to everything anyway :P So we add the following to /etc/sudoers using visudo (do not etc the /etc/sudoers file directly).

Bash variable expansion

Straight from https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html

Act on files containing a matching string

Quite often it's not enough to simply find files that contain a certain string as you also want to do something with those files once found.

Subscribe to RSS - bash