summaryrefslogtreecommitdiff
path: root/src/op_mode/show_current_user.sh
blob: 93e6efa61c41c9f2bc11e80c010fc31ecf8d0f75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#! /bin/bash

echo -n "login     : " ; who -m

if [ -n "$VYATTA_USER_LEVEL_DIR" ]
then
    echo -n "level     : "
    basename $VYATTA_USER_LEVEL_DIR
fi

echo -n "user      : " ; id -un
echo -n "groups    : " ; id -Gn

if id -Z >/dev/null 2>&1
then
    echo -n "context   : "
    id -Z
fi