[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20020905: LDM and *nix who



>From: "Mark J. Laufersweiler" <address@hidden>
>Organization: OU
>Keywords: 200209050520.g855KXZ20492 LDM ldmadmin who

Hi Mark,

>Okay, I am now upgrading the ldm from 5.1.4 to 5.2. Problem.

Upgrading is good; problem is bad ;-)

>I am running our ldm on the FreeBSD 4.4 OS. There when issuing the
>command who, there are not switches. I notice now that ldmadmin uses
>who -m.
>
>Q1: How important is it that who return only information from the
>current terminal? (ie, Can I just delete the switch?)

The purpose of adding the who to ldmadmin is to log who is stopping
and restarting the LDM.  I just checked a FreeBSD system I have access
to and see the following in the man entry:

WHO(1)                  FreeBSD General Commands Manual                 WHO(1)

NAME
     who - display who is logged in

SYNOPSIS
     who am I
     who [file]

DESCRIPTION
     The who utility displays a list of all users currently logged on, showing
     for each user the login name, tty name, the date and time of login, and
     hostname if not local.

     Available options:

     am I  Returns the invoker's real user name.

     file  By default, who gathers information from the file /var/run/utmp.
           An alternate file may be specified which is usually /var/log/wtmp
           (or /var/log/wtmp.[0-6] depending on site policy as wtmp can grow
           quite large and daily versions may or may not be kept around after
           compression by ac(8)).  The wtmp file contains a record of every
           login, logout, crash, shutdown and date change since wtmp was last
           truncated or created.

     If /var/log/wtmp is being used as the file, the user name may be empty or
     one of the special characters '|', '}' and '~'.  Logouts produce an out-
     put line without any user name.  For more information on the special
     characters, see utmp(5).

FILES
     /var/run/utmp
     /var/log/wtmp
     /var/log/wtmp.[0-6]

SEE ALSO
     last(1), users(1), getuid(2), utmp(5)

HISTORY
     A who command appeared in Version 1 AT&T UNIX.


So, it looks like you could replace 'who -m' in $who_cmd with 'who am I'
and get the desired effect of identifying the exact person that is starting
and stopping the LDM.

We will need to look into this FreeBSD difference with the who command
when we get our FreeBSD machine up and running the LDM.  Until then,
you will be forced to modify the copy of ldmadmin that you are using.

Tom

>From address@hidden Thu Sep  5 09:13:10 2002
>cc: <address@hidden>, Anne Wilson <address@hidden>,
>   <address@hidden>
>Subject: Re: 20020905: LDM and *nix who

Tom,

Duh. I read that same man page and did not see the fact that
`who am i` works as who -m.

Thanks.

There is a section in FreeBSD that has binaries that are/should be
linux equivalents. They are locaated in /usr/compat/linux/usr/bin
etc. I tried those first but they did not work. However, I am
up-to-date on patches to FreeBSD but a version behind. This may work
as expect in the current release of FreeBSD.

mjl