Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

whoami(1b) [sunos man page]

whoami(1B)					     SunOS/BSD Compatibility Package Commands						whoami(1B)

whoami - display the effective current username SYNOPSIS
/usr/ucb/whoami DESCRIPTION
whoami displays the login name corresponding to the current effective user ID. If you have used su to temporarily adopt another user, whoami will report the login name associated with that user ID. whoami gets its information from the geteuid and getpwuid library routines (see getuid and getpwnam(3C), respectively). FILES
/etc/passwd username data base ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWscpu | +-----------------------------+-----------------------------+ SEE ALSO
su(1M), who(1), getuid(2), getpwnam(3C), attributes(5) SunOS 5.10 14 Sep 1992 whoami(1B)

Check Out this Related Man Page

hostconfig(1M)						  System Administration Commands					    hostconfig(1M)

hostconfig - configure a system's host parameters SYNOPSIS
/usr/sbin/hostconfig -p protocol [-d] [ -h] [-n] [-v] [-i interface] [-f hostname] DESCRIPTION
The hostconfig program uses a network protocol to acquire a machine's host parameters and set these parameters on the system. The program selects which protocol to use based on the argument to the required -p flag. Different protocols may set different host param- eters. Currently, only one protocol (bootparams) is defined. OPTIONS
The following options are supported: -d Enable debug output. -f hostname Run the protocol as if this machine were named hostname. -h Echo the received hostname to stdout, rather than setting hostname using the system name directly. -i interface Use only the named network interface to run the protocol. -n Run the network protocol, but do not set the acquired parameters into the system. -p protocol Run hostconfig using protocol. Currently, only one protocol (bootparams) is available. This option is required. Specifying the -p bootparams option uses the whoami call of the RPC bootparams protocol. This sets the system's hostname, domainname, and default IP router parameters. -v Enable verbose output. EXAMPLES
Example 1: Configuring Host Parameters with Verbose Output The following command configures a machine's host parameters using the whoami call of the RPC bootparams protocol with a verbose output. example# hostconfig -p bootparams -v Example 2: Displaying Host Parameters The following command displays the parameters that would be set using the whoami call of the RPC bootparams protocol. example# hostconfig -p bootparams -n -v Example 3: Configuring Host Parameters Less the System Name The following command configures a machine's host parameters, less the system name, using the whoami call of the RPC bootparams protocol. example# hostconfig='hostconfig -p bootparams -h' ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
hostname(1), domainname(1M), route(1M), attributes(5) SunOS 5.10 6 Nov 2000 hostconfig(1M)
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

grep help

Hi, I am stuck in this script doing multiple grep If I give the following, it works fine: #!/usr/bin/ksh export ENV=`/usr/ucb/whoami | cut -b6` export USR=`/usr/ucb/whoami` #Sourcing the server . /netprov/env$ENV/server/mng/utility/syccpovdef cd $CCP_AUDIT echo "UserId:\c" read... (5 Replies)
Discussion started by: gundu
5 Replies

2. UNIX for Advanced & Expert Users

Login error....

We have a situation where one of my users log's into my Solaris box and gets the followin error..... rsh marvin Last login: Tue Jun 28 07:28:18 from lvie450 whoami: fatal: can't open file: errno=2 Killed /home/username @marvin> Anyone have any idea? Frank (2 Replies)
Discussion started by: frankkahle
2 Replies

3. UNIX for Dummies Questions & Answers

Alias commands

how do you alias a command... Like say I wanted kitten to exicute the command whoami. how would I do that? Thank you for your time. (2 Replies)
Discussion started by: Mars8082686
2 Replies

4. Shell Programming and Scripting

Get username in script

how would i go about getting the username of the person currently logged in, and then using the username in a shell script? i've tried variations of user=whoami , 'whoami' , $whoami , and none of the above work :( lol I'd like to get the username to then mount a network share such that the... (9 Replies)
Discussion started by: willc0de4food
9 Replies

5. Shell Programming and Scripting

Changing text in the command prompt

Hi, I want to change my command prompt to contain the current username and the current directory in it, instead of just the '$' symbol. I tried the command:- export PS1="$(echo \\n$) " But whenever I switch the user or change the directory, the changes are not reflected in the command... (10 Replies)
Discussion started by: unipepper
10 Replies

6. UNIX for Dummies Questions & Answers

cant get this to work

whoami | grep < $1 | echo $1 trying to write a script that finds out who the user is and then takes occurences of that username from a file that is passed as an argument and then displays it (6 Replies)
Discussion started by: iago
6 Replies

7. Shell Programming and Scripting

How to find user/login id?

It seems like not all Unix have whoami. What is the alterate way to display just the login id? Any help is appreciated jak (5 Replies)
Discussion started by: jakSun8
5 Replies

8. Shell Programming and Scripting

while loop problem

#!/bin/sh clear befehle=( whoami ls who finger ps ) eingabe=5 while do # for i in 0 1 2 3 4 # do # echo $i - ${befehle} #done echo "you're still in the loop" read eingabe echo "Input:" $eingabe done Hello, (8 Replies)
Discussion started by: Aliboy
8 Replies

9. AIX

Permission denied when rm or chmod

I got "Permission denied" error message when I rm or chmod a file. I'm the owner of the file "lice_20091123.tar". How can I solve this matter? lice@appl:/midasapp/lice> whoami lice lice@appl:/midasapp/lice> who am i guest pts/12 Nov 23 19:09 ( ... (3 Replies)
Discussion started by: kang
3 Replies

10. AIX


Is there any way to allow users to access the etc/passwd file for commands like whoami but not be able to read the file? If I don't put a user in the security group and change the permissions on the etc/passwd file to 640 (rw-r-----) the users can login but the whoami command doesn't work for... (5 Replies)
Discussion started by: daveisme
5 Replies

11. OS X (Apple)

sudo chown -R `whoami` /usr/local

I was following a tutorial on installing Homebrew and I changed the ownership of /usr/local/ to me. Now McAfee Security won't start This is the exact line I typed: sudo chown -R `whoami` /usr/local Then I tried to fix it with: sudo chown -R root /usr/local I still can't start mcafee. It say... (7 Replies)
Discussion started by: chancho
7 Replies

12. UNIX for Dummies Questions & Answers

[Solved] weird in find -exec command

i feel weird with this 2 command find /tmp/*test* -user `whoami` -mtime +1 -type f -exec rm -f {}\; find /tmp/*test* -user `whoami` -mtime +1 -type f -exec ls -lrt {}\; the first one return correct which only delete those filename that consist *test* where second command it listed all the... (12 Replies)
Discussion started by: lsy
12 Replies

13. Shell Programming and Scripting

Unable to set my PATH variable

Hello All, Hope you can understand my problem from the below code. $ cat ~/.profile PS1=`whoami`@`hostname`':$PWD $ ' export PATH="$PATH:.:/logarchive/utility/util:/usr/sbin:" $ echo $PATH /usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:.:/usr/sbin: $ echo $SHELL /usr/bin/ksh ... (6 Replies)
Discussion started by: sathyaonnuix
6 Replies

14. AIX

Capture whoami log on a specific command

// AIX 6.1 TL8 Please advise on how to capture whoami log or the user and time info into a log file (i.e. /tmp/cmdcapture.log) whenever users are executing a certain command(s) so that I can keep the single log history (for all users) of who did what. The command(s) I need to monitor are a... (3 Replies)
Discussion started by: Daniel Gate
3 Replies

15. Shell Programming and Scripting

List Process running under current user

Hi, i need to list the processes running only under current logged in user. EX: $ whoami oraaqw $ ps -ef | grep tnslsnr oraaqw 11403300 19267592 0 09:14:47 pts/3 0:00 grep tnslsnr oraaqw 15794208 1 0 Jan 14 - 11:59... (6 Replies)
Discussion started by: aravindadla
6 Replies