aboutsummaryrefslogtreecommitdiff
path: root/suser
blob: 6d2eaaf84432eeb3a2f33852115ebf2082107665 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env bash
#
# A shorthand for changing to a user
#

# Parameters
BASENAME="`basename $0`"
USER="$1"

if [ -z "$USER" ]; then
  echo "usage: $BASENAME <user>"
  exit 1
fi

sudo su $USER -s $SHELL