Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
alternative to "whoami" ?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  16 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
noobuntu  
View profile  
 More options Jun 30 2008, 12:14 pm
Newsgroups: alt.solaris.x86
From: noobuntu <webtour...@gmail.com>
Date: Mon, 30 Jun 2008 09:14:27 -0700 (PDT)
Local: Mon, Jun 30 2008 12:14 pm
Subject: alternative to "whoami" ?

bash-2.03$ whoami
bash: whoami: command not found

Is there an alternative to "whoami" ?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave Uhring  
View profile  
 More options Jun 30 2008, 12:48 pm
Newsgroups: alt.solaris.x86
From: Dave Uhring <daveuhr...@yahoo.com>
Date: Mon, 30 Jun 2008 11:48:45 -0500
Local: Mon, Jun 30 2008 12:48 pm
Subject: Re: alternative to "whoami" ?

On Mon, 30 Jun 2008 09:14:27 -0700, noobuntu wrote:

> bash-2.03$ whoami
> bash: whoami: command not found
> Is there an alternative to "whoami" ?

who am i
/usr/ucb/whoami

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
noobuntu  
View profile  
 More options Jun 30 2008, 12:52 pm
Newsgroups: alt.solaris.x86
From: noobuntu <webtour...@gmail.com>
Date: Mon, 30 Jun 2008 09:52:19 -0700 (PDT)
Local: Mon, Jun 30 2008 12:52 pm
Subject: Re: alternative to "whoami" ?

> who am i
> /usr/ucb/whoami

haha never knew "who am i" - thanks

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Geoff Lane  
View profile  
 More options Jun 30 2008, 12:40 pm
Newsgroups: alt.solaris.x86
From: Geoff Lane <zzas...@buffy.sighup.org.uk>
Date: Mon, 30 Jun 2008 16:40:00 -0000
Subject: Re: alternative to "whoami" ?

noobuntu <webtour...@gmail.com> wrote:

> bash-2.03$ whoami
> bash: whoami: command not found

> Is there an alternative to "whoami" ?

$ who am i

--
1034 gods I don't believe in: http://anya.sighup.org.uk/gods.html


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Canuck57  
View profile  
 More options Jun 30 2008, 7:35 pm
Newsgroups: alt.solaris.x86
From: "Canuck57" <dave-no_s...@nospam.net>
Date: Mon, 30 Jun 2008 23:35:16 GMT
Local: Mon, Jun 30 2008 7:35 pm
Subject: Re: alternative to "whoami" ?

"noobuntu" <webtour...@gmail.com> wrote in message

news:c518e915-63c6-48b2-9182-8e03e8e3a80b@y38g2000hsy.googlegroups.com...

>> who am i
>> /usr/ucb/whoami

> haha never knew "who am i" - thanks

But watch out, they can return different results, an example:

----------
me@trout:/home/me $ su -
Password:
Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
root@trout:/root # who am i
me         pts/1        Jun 30 17:27    (cod.mydom.net)
root@trout:/root # whoami
root
root@trout:/root #
--------------

'who am i' returns who you logged in as, where as '/usr/ucb/whoami' returns
your effective ID, not always the same either.

It is best to add ucb to your search path:

PATH=$PATH:/usr/ucb:/usr/sfw/bin:/usr/ccs/bin
export PATH


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave Uhring  
View profile  
 More options Jun 30 2008, 8:19 pm
Newsgroups: alt.solaris.x86
From: Dave Uhring <daveuhr...@yahoo.com>
Date: Mon, 30 Jun 2008 19:19:35 -0500
Local: Mon, Jun 30 2008 8:19 pm
Subject: Re: alternative to "whoami" ?

On Mon, 30 Jun 2008 23:35:16 +0000, Canuck57 wrote:
> It is best to add ucb to your search path:

Not!  His next question then will be why cc doesn't work.

Worse, if /usr/ucb is not *last* in the $PATH ps will not work as expected
either.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rich Teer  
View profile  
 More options Jun 30 2008, 11:00 pm
Newsgroups: alt.solaris.x86
From: Rich Teer <rich.t...@rite-group.com>
Date: Tue, 01 Jul 2008 03:00:58 GMT
Local: Mon, Jun 30 2008 11:00 pm
Subject: Re: alternative to "whoami" ?

On Mon, 30 Jun 2008, noobuntu wrote:
> Is there an alternative to "whoami" ?

Yep:

        /usr/xpg4/bin/id -un

rich@zen4153# /usr/xpg4/bin/id -un
rich

--
Rich Teer, SCSA, SCNA, SCSECA

CEO,
My Online Home Inventory

URLs: http://www.rite-group.com/rich
      http://www.linkedin.com/in/richteer
      http://www.myonlinehomeinventory.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rich Teer  
View profile  
 More options Jun 30 2008, 11:01 pm
Newsgroups: alt.solaris.x86
From: Rich Teer <rich.t...@rite-group.com>
Date: Tue, 01 Jul 2008 03:01:50 GMT
Local: Mon, Jun 30 2008 11:01 pm
Subject: Re: alternative to "whoami" ?

On Mon, 30 Jun 2008, Canuck57 wrote:
> It is best to add ucb to your search path:

Not it is NOT!  /usr/ucb is an anacronism, best forgotten in this
day and age.

--
Rich Teer, SCSA, SCNA, SCSECA

CEO,
My Online Home Inventory

URLs: http://www.rite-group.com/rich
      http://www.linkedin.com/in/richteer
      http://www.myonlinehomeinventory.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
AGT  
View profile  
 More options Jul 1 2008, 12:44 am
Newsgroups: alt.solaris.x86
From: AGT <usenetpersonger...@gmail.com>
Date: Mon, 30 Jun 2008 21:44:06 -0700
Local: Tues, Jul 1 2008 12:44 am
Subject: Re: alternative to "whoami" ?

On Mon, 30 Jun 2008 19:19:35 -0500, Dave Uhring wrote:
> On Mon, 30 Jun 2008 23:35:16 +0000, Canuck57 wrote:
>> It is best to add ucb to your search path:
> Not!  His next question then will be why cc doesn't work.

: > Good one

> Worse, if /usr/ucb is not *last* in the $PATH ps will not work as expected
> either.

One might try using aliases for /usr/ucb stuff and /usr/xpg? stuff
Keeps PATH clean

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave Uhring  
View profile  
 More options Jul 1 2008, 1:37 am
Newsgroups: alt.solaris.x86
From: Dave Uhring <daveuhr...@yahoo.com>
Date: Tue, 01 Jul 2008 00:37:30 -0500
Local: Tues, Jul 1 2008 1:37 am
Subject: Re: alternative to "whoami" ?

On Mon, 30 Jun 2008 21:44:06 -0700, AGT wrote:
> On Mon, 30 Jun 2008 19:19:35 -0500, Dave Uhring wrote:
>> Worse, if /usr/ucb is not *last* in the $PATH ps will not work as expected
>> either.

> One might try using aliases for /usr/ucb stuff and /usr/xpg? stuff
> Keeps PATH clean

Or, if running Nevada or OpenSolaris, just have /usr/gnu/bin in the $PATH.
Heh!, that's not even necessary:

duhring@einstein:~$ which whoami
/usr/bin/whoami


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
usenetpersonger...@gmail.com  
View profile  
 More options Jul 1 2008, 12:03 pm
Newsgroups: alt.solaris.x86
From: usenetpersonger...@gmail.com
Date: Tue, 1 Jul 2008 09:03:38 -0700 (PDT)
Local: Tues, Jul 1 2008 12:03 pm
Subject: Re: alternative to "whoami" ?
On Jun 30, 10:37 pm, Dave Uhring <daveuhr...@yahoo.com> wrote:

> On Mon, 30 Jun 2008 21:44:06 -0700, AGT wrote:
> > On Mon, 30 Jun 2008 19:19:35 -0500, Dave Uhring wrote:
> >> Worse, if /usr/ucb is not *last* in the $PATH ps will not work as expected
> >> either.
> > One might try using aliases for /usr/ucb stuff and /usr/xpg? stuff
> > Keeps PATH clean
> Or, if running Nevada or OpenSolaris, just have /usr/gnu/bin in the $PATH.
> Heh!, that's not even necessary:
> duhring@einstein:~$ which whoami
> /usr/bin/whoami

I havent checked my b90 install for /usr/ucb - hope they dont do away
with it but who knows.
Thing is, a GNU version of something isnt always "better" than the
original.
Is there a vipw for example? Probably not. /usr/ucb/shutdown can get
you
out of some jams that the svr4 descendant cannot. /usr/ucb is small
sans
all the symlinks. I hope it survives the current wave of
"we gotta make Solaris more Lienux friendly" types developing at Sun
nowadays : >

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Ridd  
View profile  
 More options Jul 1 2008, 12:49 pm
Newsgroups: alt.solaris.x86
From: Chris Ridd <chrisr...@mac.com>
Date: Tue, 1 Jul 2008 17:49:55 +0100
Local: Tues, Jul 1 2008 12:49 pm
Subject: Re: alternative to "whoami" ?
On 2008-07-01 17:03:38 +0100, usenetpersonger...@gmail.com said:

It is still there in b91, as is /usr/ucblib and /usr/ucbinclude.

Cheers,

Chris


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave Uhring  
View profile  
 More options Jul 1 2008, 1:02 pm
Newsgroups: alt.solaris.x86
From: Dave Uhring <daveuhr...@yahoo.com>
Date: Tue, 01 Jul 2008 12:02:24 -0500
Local: Tues, Jul 1 2008 1:02 pm
Subject: Re: alternative to "whoami" ?

On Tue, 01 Jul 2008 09:03:38 -0700, usenetpersongerryt wrote:
> I havent checked my b90 install for /usr/ucb - hope they dont do away
> with it but who knows.

With Sun's promise of backward compatibility /usr/ucb and cousins will
probably remain for some time to come.

> Thing is, a GNU version of something isnt always "better" than the
> original.

Granted, but sometimes the GNU versions do have additional or different
utility.  Additionally, the presence of such penguinware eases the
transition for Linux emigrés.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Ridd  
View profile  
 More options Jul 1 2008, 1:28 pm
Newsgroups: alt.solaris.x86
From: Chris Ridd <chrisr...@mac.com>
Date: Tue, 1 Jul 2008 18:28:17 +0100
Local: Tues, Jul 1 2008 1:28 pm
Subject: Re: alternative to "whoami" ?
On 2008-07-01 18:02:24 +0100, Dave Uhring <daveuhr...@yahoo.com> said:

> On Tue, 01 Jul 2008 09:03:38 -0700, usenetpersongerryt wrote:

>> Thing is, a GNU version of something isnt always "better" than the
>> original.

> Granted, but sometimes the GNU versions do have additional or different
> utility.  Additionally, the presence of such penguinware eases the
> transition for Linux emigrés.

The -r option in GNU's grep is quite handy, for instance.

Cheers,

Chris


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave Uhring  
View profile  
 More options Jul 1 2008, 2:24 pm
Newsgroups: alt.solaris.x86
From: Dave Uhring <daveuhr...@yahoo.com>
Date: Tue, 01 Jul 2008 13:24:02 -0500
Local: Tues, Jul 1 2008 2:24 pm
Subject: Re: alternative to "whoami" ?

On Tue, 01 Jul 2008 18:28:17 +0100, Chris Ridd wrote:
> The -r option in GNU's grep is quite handy, for instance.

You mean it's easier than find . -type f -exec grep pattern {} +   ;>

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thommy M.  
View profile  
 More options Jul 1 2008, 3:00 pm
Newsgroups: alt.solaris.x86
From: "Thommy M." <eclipsed9876543...@hotmail.com>
Date: Tue, 01 Jul 2008 19:00:24 GMT
Local: Tues, Jul 1 2008 3:00 pm
Subject: Re: alternative to "whoami" ?

Chris Ridd wrote:
> On 2008-07-01 18:02:24 +0100, Dave Uhring <daveuhr...@yahoo.com> said:

>> On Tue, 01 Jul 2008 09:03:38 -0700, usenetpersongerryt wrote:

>>> Thing is, a GNU version of something isnt always "better" than the
>>> original.

>> Granted, but sometimes the GNU versions do have additional or different
>> utility.  Additionally, the presence of such penguinware eases the
>> transition for Linux emigrés.

> The -r option in GNU's grep is quite handy, for instance.

Not to mention -A and -B

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »