Set per-user initialisation in ~/.become/<user>.
--- /dev/null
+cd
+export TERMINFO=$BECOME_HOME/.terminfo
+. $BECOME_HOME/.profile.d/ps1.bashrc
+__ps1
+vim=$($BECOME_HOME/opt/bin/find_working vim 2>/dev/null)
+if [ -n "$vim" ]; then
+ alias vim="$vim --cmd ':se rtp=$BECOME_HOME/.vim' -u $BECOME_HOME/.vimrc"
+ alias vi=vim
+fi
+unset vim
+set -o vi
--- /dev/null
+#!/bin/bash
+
+user="$1"
+if [ -z "$user" ]; then
+ echo >&2 "Usage: become <user>"
+ exit 1
+fi
+
+BECOME="$HOME/.become"
+profile="$BECOME/$user"
+[ -f "$profile" ] || profile="$BECOME/all"
+
+exec sudo -H -u "$user" env BECOME_HOME="$HOME" /bin/bash --rcfile "$profile"