whoami should return a user id that is assigned to the UID that you are
running under. If you are using the default OMVS User Id (Which must be
changed for z/OS V2.1) or a shared UID, then you will get any UID sharing
that UID returned.
who { and options } ; eg; who am i - can display additional information
about the user. By default, who display information about user's login
name, terminal name and time logged in. Note who am only works in the
POSIX locale
id will return the uid(username) gid(groupname). Again, if sharing uid
then any uid having that value can be returned.
logname will return the login name which is obtain via getlogin()
function.
Just for some additional notes, this is what I always do so that I always
know who I am and where I am at in OMVS...........
in /etc/profile I make sure logname is readonly so it can not be
changed......
readonly LOGNAME
set my command prompt to System Name:Log name:Directory
PS1='$System_Name':'$LOGNAME':'$PWD':'===>
export PS1
Craig
From: "Farley, Peter x23353" <[email protected]>
To: [email protected],
Date: 12/13/2013 12:48
Subject: Re: OMVS UID display
Sent by: IBM Mainframe Discussion List <[email protected]>
Interesting thread. From my strictly application-programmer level TSO
userid (the only one I have), entering those commands from TSO OMVS yields
the following results:
$ who am i
$ whoami
TSOUSER
$ id
uid=6101(TSOUSER) gid=60(OAPLGRP)
$ logname
FSUM6764 logname: cannot get login name
$
(Real userid was replaced by TSOUSER). No results at all from "who am I"
and a failure from "logname".
I suspect but cannot prove that system-programmer authority levels
probably produce distinctly different results.
Peter
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On
Behalf Of venkat kulkarni
Sent: Friday, December 13, 2013 1:37 PM
To: [email protected]
Subject: Re: OMVS UID display
LOGNAME command gives my RACF ID . Then what is the use of ID and WHOAMI
command. Why these command is working for some of them and for others not.
On Sat, Dec 14, 2013 at 12:03 AM, Bonno, Tuco <[email protected]> wrote:
>
> try "logname" ( w/o the the double quotes )
>
--
This message and any attachments are intended only for the use of the
addressee and may contain information that is privileged and confidential.
If the reader of the message is not the intended recipient or an
authorized representative of the intended recipient, you are hereby
notified that any dissemination of this communication is strictly
prohibited. If you have received this communication in error, please
notify us immediately by e-mail and delete the message and any attachments
from your system.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
**********************************************************************
This communication contains information which is confidential and
may also be privileged. It is for the exclusive use of the intended
recipient(s). If you are not the intended recipient(s), please note
that any distribution, copying or use of this communication or the
information in it is strictly prohibited. If you have received this
communication in error, please notify the sender immediately and
then destroy any copies of it.
**********************************************************************
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN