Update comment so it matches the current code (refs: #15583)
[tails.git] / config / chroot_local-includes / etc / bash.bashrc.d / replace-su-with-sudo.sh
blob3fe81fb7c6327a957534a167a9c74f64c7acad77
1 #!/bin/bash
3 # Replace su by a message to use sudo.
5 # In Tails, the administration password doesn't work with 'su'. New
6 # users in particular may be puzzled by the authentication failures
7 # while trying to 'su' using administration password.
9 # This script introduces 'su' function for non-root users. The 'su'
10 # function executes '/usr/local/bin/replace-su-with-sudo', which asks
11 # them to use 'sudo' instead of 'su'.
13 # https://redmine.tails.boum.org/code/issues/15583
15 # Get LIVE_USERNAME
16 . /etc/live/config.d/username.conf
18 # Only add the 'su' function for the desktop user.
19 [ "$USER" == "$LIVE_USERNAME" ] || return
21 su (){
22 /usr/local/bin/replace-su-with-sudo