who command option not working


 
Thread Tools Search this Thread
Operating Systems HP-UX who command option not working
# 8  
Old 11-29-2009
Please post the output from the following command when logged in as the user:

Code:
tty

Please post the output from the following commands when logged in as "root":

Code:
ls -lisad /var/adm/wtmp
ls -lisad /usr/adm/wtmp

bdf /usr /var

# 9  
Old 11-29-2009
Logged in as user

$ tty
/dev/ttyp1
$


Logged in as root
# ls -lisad /var/adm/wtmp
24 96 -rw-rw-r-- 1 adm adm 46260 Nov 25 16:29 /var/adm/wtmp
# ls -lisad /usr/adm/wtmp
24 96 -rw-rw-r-- 1 adm adm 46260 Nov 25 16:29 /usr/adm/wtmp
# bdf /usr /var
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol7 10485760 3814240 6619488 37% /usr
/dev/vg00/lvol8 10485760 2034584 8385424 20% /var
#
# 10  
Old 12-08-2009
Who works for root but not user

Logged in as root
# who -R
root pts/ta Dec 7 22:47 (1IMAGE)
awrpt pts/tb Dec 7 11:00 (DUKE-TESTKRON)
awrpt pts/tc Dec 7 11:00 (DUKE-TESTKRON)
root pts/td Dec 7 22:58 (1IMAGE)
# who -m
root pts/td Dec 7 22:58
# who -mR
root pts/td Dec 7 22:58 (1IMAGE)
# who am i
root pts/td Dec 7 22:58
# who am i -R
root pts/td Dec 7 22:58 (1IMAGE)
#


Logged as user
$ who -R
root pts/ta Dec 7 22:47 (1IMAGE)
awrpt pts/tb Dec 7 11:00 (DUKE-TESTKRON)
awrpt pts/tc Dec 7 11:00 (DUKE-TESTKRON)
dw pts/td Dec 7 23:00 (1IMAGE)
$ who -m
$ who -mR
$ who am i
$ who am i -R
$
# 11  
Old 12-09-2009
This bit makes no sense:

Quote:
Logged in as user

$ tty
/dev/ttyp1
$

The device name does not appear in your "who -R" list. Looks like some sort of serial terminal.


Please check permissions on your "/etc/hosts" file. Usually 644 .


Did you post the permissions of your "/etc/utmp" file ? Usually 644 .
# 12  
Old 12-09-2009
The problem is not the -R option but the -m option.

# ls -al /etc/hosts
-rw-rw-rw- 1 root root 627 Dec 3 14:25 /etc/hosts
# ls -al /etc/utmp
-rw-rw-rw- 1 root sys 0 Dec 9 09:31 /etc/utmp
#

$ tty
/dev/ttyp1
$ who -R
root console Dec 9 09:27 (HP3600)
dw pts/ta Dec 9 09:55 (1IMAGE)
awrpt pts/tb Dec 7 11:00 (DUKE-TESTKRON)
awrpt pts/tc Dec 7 11:00 (DUKE-TESTKRON)
root pts/td Dec 8 13:10 (1IMAGE)
$
$ who
root console Dec 9 09:27
dw pts/ta Dec 9 09:55
awrpt pts/tb Dec 7 11:00
awrpt pts/tc Dec 7 11:00
root pts/td Dec 8 13:10
$
$ who -m
$
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Maxdepth option of find command not working

Can you please figure out what is the issue here $ find . -maxdepth 1 -type f -size 0 -print find: bad option -maxdepth please find the OS details $ uname -a HP-UX g5u1216 B.11.31 U ia64 2614088426 unlimited-user license Use code tags, thanks. (6 Replies)
Discussion started by: TomG
6 Replies

2. AIX

SQLPLUS -S option not working

Hi All, I am using the following script to run some sql on database but i am not getting the result. When i tried the same by removing "-s" option it is working fine but getting other things as well with my input as shown below. Can anyone please suggest why "-s" option is not working in AIX and... (2 Replies)
Discussion started by: ssk250
2 Replies

3. Shell Programming and Scripting

-v and -f option for grep not working

In solaris, i m trying to find the files having a particulat extension and then from the list i want to exclude those files which is present in a file. But it seems the -f and -v option are not working find $source -type f -name $extn | /usr/xpg4/bin/grep -F -v -f $exclude | while read... (7 Replies)
Discussion started by: millan
7 Replies

4. Shell Programming and Scripting

Egrep not working with -f option

Hi, I am trying to find out patterns in file 1 using patterns stored in file 2. Following is the code FILE1=inputfilename FILE2=blacklist blacklist 1203 97715555 20afEOF egrep -f $FILE2 $FILE1 but the above code is not working either using egrep or grep. Just for your... (10 Replies)
Discussion started by: siramitsharma
10 Replies

5. UNIX for Dummies Questions & Answers

~c is not working properly with -r option

Hi There, --------- file1 ------- ~c asd@ac.com -------------- Now i am using below command cat file1|mailx -s " testing" -r " My Name" abc@tech.com (3 Replies)
Discussion started by: Tapan Sharma
3 Replies

6. Shell Programming and Scripting

daystart option not working in find command

Hi, I am trying to list all the files created / modified today in a directory. With reference to this thread, https://www.unix.com/shell-programming-scripting/20324-capture-all-today-files.html I have used the below command to list all the files modified today. find . -daystart -type f... (8 Replies)
Discussion started by: arunkumarmc
8 Replies

7. Shell Programming and Scripting

sub option of awk command not working with "\" character.

Hi all, I would like to replace some string in a text file by some string which would contains special characters like "/","\". I.e. I have a text file with the statement contactperson somewhere in it. Now I want to replace it by something else which includes special characters like "/","\" ... (1 Reply)
Discussion started by: shareef
1 Replies

8. UNIX for Advanced & Expert Users

For ls command,-r option is not working on OSF1

There r 2 servers. Lets call them S1 and S2.. S1 is OSF1 and S2 is SunOS.. One directory of S2 is mounted on S1. say abc/xyz There is one application which continuously put xml files in that directory (on S2). If we give command “ls -lrt” on S2 it gives proper output.. (i.e. gives list... (1 Reply)
Discussion started by: asmita
1 Replies

9. UNIX for Dummies Questions & Answers

-d option not working...

:confused: In the following, when I enter a valid, existing directory,why am I getting Not Found when the Dir DOES exist? read auser echo "You entered $auser" wait 2 cd /home if then echo "Dir Exists" sleep 2 else echo "/home/$auser Not Found" sleep... (2 Replies)
Discussion started by: rgouette
2 Replies

10. Solaris

Why does the 'ps' command with -u option not working?

How can I use the 'ps' command to view current sessions but only for a given process/user, with the -u parm? In older versions of Unix, this used to work, but not in Sun Solaris. Thanks (4 Replies)
Discussion started by: ElCaito
4 Replies
Login or Register to Ask a Question