script to control login times

Todd Pfaff todd at edge.cis.mcmaster.ca
Fri Feb 27 05:27:56 GMT 1998


On Fri, 27 Feb 1998, Gerald W. Carter wrote:

> Andre Gerhard wrote:
> > 
> > At 01:20 AM 2/26/98 +1100, you wrote:
> > >Nuno Loureiro wrote:
> > >>
> > >> Hi!!
> > >>
> > >> Anyone did or know about a script to know user's login time?!?!
> > >> I have a lab with 20 computers, and I want to do a page with the
> > >> time each user is logged in.
> > >
> > >We have a program that logs to wtmp.  It is setup as a preexec and
> > >postexec to the [homes] share.  I can make it available if you would
> > >like.
> > >
> > >
> > Hello, Gerald !
> > 
> > I am really interested in your script ...
> > Could you post it to the ntdom list, or send it to me ?
> 
> I have had a couple of requests for the program we use to log users to
> wtmp.  I am trying to find time in the next day or so to clean things up
> and will post a URL to the source code ( in C ) shortly.

if you're using sunos (5.5 anyway) you can use the sessreg program to
do this.  you can also find sessreg source code in the x11r5
mit/clients/xdm source directory.

root preexec  = [ %U != nobody ] && /usr/openwin/bin/sessreg -a -l s/%M -s %d %U
root postexec = [ %U != nobody ] && /usr/openwin/bin/sessreg -d -l s/%M -s %d %U

--
Todd Pfaff                         \  Email: pfaff at mcmaster.ca
Computing and Information Services  \ Voice: (905) 525-9140 x22920
ABB 132                              \  FAX: (905) 528-3773
McMaster University                   \
Hamilton, Ontario, Canada  L8S 4M1     \



More information about the samba-ntdom mailing list