man uakid





NAME


  uakid	- Show real uid, effective uid,	or login information.


SYNOPSIS


  uakid	[-options]


DESCRIPTION


  The uakid command displays process information including real, effective,
  or login uid (Digital	UNIX) and login	device,	passwd information, etc.  The
  primarily utility for	uakid is capturing speicific information in a script
  or validating	who you	really are.


OPTIONS


  -effective
	Get Effective (uid).
	Default	of long	display.

  -real
	Get Real (uid).
	Default	of long	display.

  -lid	Get Login (uid), Digital UNIX enhanced security.
	Default	of long	display.

  -all	Show all information.
	The various UID's aren't shown unless they do not match.

  -pid Show pid, ppid, pgrp.

  -uid Show uid	(actual).

  -gid Show gid	from passwd file.

  -login
	Show login name	(userid).

  -name
	Show effective name (userid).

  -group
	Show primary group from	passwd file.

  -comments
	Show comments field from passwd	file.

  -dir	Show home directory field from passwd file.

  -shell
	Show shell field from passwd file.

  -tty	Show login tty.

  -host
	Show login host.

  -other
	Show other (effective, real, login).

  -verbose
	Verbose	option,	shows debugging	values.


EXAMPLES


  Several short	examples:

   snkac@java: ./uakid -gid -g	    # gid and group
   users:15

   snkac@nugget: uakid -host	    # login host
   sw-oncall-01-05.sons.alaska.edu

   snkac@nugget: uakid -c	    # passwd comments field
   Kurt	Carlson

   kcarlson@onyx1: sudo	~/bin/uakid -login -name
   kcarlson:root

  Example for .profile establishing default screen size	by login host:

   if (tty -s)	   then		# following only on terminals:
     if	[ -z "$DISPLAY"	]; then	# following on non-X terminals
       case "`uakid -h"	in
       snkac.sois.alaska.edu )	stty columns 132 rows 60 ;;
       *brr.arsc.edu )		stty columns 132 rows 54 ;;
       *sw-oncall*|*uaf*du*)	stty columns 132 rows 35 ;;
       137.229.12.*)		stty columns 132 rows 35 ;;
       *)			stty columns 132 rows 35 ;;
       esac
       # [...]
     else
       # [...]
     fi
   fi

  Example for login uid	(Digital UNIX):

    snkac@nugget: sudo uakid -login -other
    snkac:Eid=root,0:Rid=root,0:Lid=snkac,7167


NOTES


  uakid	has been tested	under Digital UNIX, IRIX, and UNICOS.  Suggestions
  for enhancements or bug reports can be directed to
  dutools@ts.sois.alaska.edu.

  This command utilizes	the cci	command	parser utilized	by non-UNIX operating
  systems instead of the traditional UNIX getopt() parsing. Options have been
  defined to "look like" UNIX style options, but can be	spelled	out or gen-
  erally abbreviated. For example '-h' is the same as '-host'.	Because	of
  this multiple	options	must be	space separated	and the	hyphen is part of the
  option name.


ACKNOWLEDGEMENTS


  Written at the University of Alaska.


RELATED INFORMATION


  Files: passwd(4).

  Commands: ps(1), groups(1), w(1), whoami(1), tty(1), utmp(4).