diff options
-rw-r--r-- | Makefile.am | 1 | ||||
-rwxr-xr-x | scripts/vyatta-show-current-user | 20 | ||||
-rw-r--r-- | templates/show/login/groups/node.def | 2 | ||||
-rw-r--r-- | templates/show/login/level/node.def | 2 | ||||
-rw-r--r-- | templates/show/login/node.def | 2 | ||||
-rw-r--r-- | templates/show/login/user/node.def | 2 |
6 files changed, 29 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index 0a89edb..589bb2c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -28,6 +28,7 @@ bin_SCRIPTS += scripts/rename-image.pl bin_SCRIPTS += scripts/show-image-storage.pl bin_SCRIPTS += scripts/node-exists.pl bin_SCRIPTS += scripts/vyatta-remote-copy.pl +bin_SCRIPTS += scripts/vyatta-show-current-user sbin_SCRIPTS = scripts/dhcpv6-client-show-leases.pl diff --git a/scripts/vyatta-show-current-user b/scripts/vyatta-show-current-user new file mode 100755 index 0000000..87c5543 --- /dev/null +++ b/scripts/vyatta-show-current-user @@ -0,0 +1,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 diff --git a/templates/show/login/groups/node.def b/templates/show/login/groups/node.def new file mode 100644 index 0000000..953f866 --- /dev/null +++ b/templates/show/login/groups/node.def @@ -0,0 +1,2 @@ +help: Show current login group information +run: id -gn diff --git a/templates/show/login/level/node.def b/templates/show/login/level/node.def new file mode 100644 index 0000000..a732234 --- /dev/null +++ b/templates/show/login/level/node.def @@ -0,0 +1,2 @@ +help: Show current login level +run: [ -n "$VYATTA_USER_LEVEL_DIR" ] && basename $VYATTA_USER_LEVEL_DIR diff --git a/templates/show/login/node.def b/templates/show/login/node.def new file mode 100644 index 0000000..02061ef --- /dev/null +++ b/templates/show/login/node.def @@ -0,0 +1,2 @@ +help: Show current login credentials +run: ${vyatta_bindir}/vyatta-show-current-user diff --git a/templates/show/login/user/node.def b/templates/show/login/user/node.def new file mode 100644 index 0000000..eae80c6 --- /dev/null +++ b/templates/show/login/user/node.def @@ -0,0 +1,2 @@ +help: Show current login user id +run: id -un |