summaryrefslogtreecommitdiff
path: root/scripts/vyatta-show-current-user
blob: f55f047d659b500f5a7459825ad88fdc79951e18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#! /bin/bash
#
# Simple script for "show login"

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