No Next Item No Next Conference Can't Favor Can't Forget Item List Conference Home Entrance    Help
View Responses


Grex Helpers Item 13: i can help you with newusers
Entered by carl on Sat Aug 27 00:21:32 UTC 1994:

I'm happy to announce the new and improved (even though it's only the 
first) version of "i", a program to identify a given user.

It's currently located in /u/carl/bin, and it requires a user's
loginid to run.  By typing "/u/carl/bin/i carl", you can find
out what I have in /etc/passwd, what groups I belong to, my
.plan file, what system files I use and what files are in my
home directory.  Granted, that's a lot of info, but the nice thing
is that it can be run quickly while in a write or talk session.
If you have a scroll-back buffer, you can easily look back at
this info and not have to leave the write or talk session.

I hope to have this program moved to /usr/local/bin to make
it easier to access.  Of course, that won't be until after
the disk situation is settled...

If you have any comments or suggestions please mail me or
respond here.

16 responses total.



#1 of 16 by robh on Sat Aug 27 02:34:05 1994:

Thanks!  (It always annoys me, not being able to finger someone
while talking to them because it takes so long.)


#2 of 16 by rcurl on Sat Aug 27 04:33:10 1994:

That's a great idea. I go through that with many helpees, but tell
them to wait while I look up that information. This will make it faster.
BUT:
/home/rcurl /u/carl/bin/i carl
/u/carl/bin/i: _i: not found 
?


#3 of 16 by robh on Sat Aug 27 10:56:55 1994:

Sadly, carl, I got the same thing.


#4 of 16 by carl on Sat Aug 27 21:26:15 1994:

Sorry 'bout that.  Just remedied the situation.

(i called _i, which worked for me.  Now it calls /u/carl/bin/_i,
which works for anyone.)


#5 of 16 by carl on Fri Sep 2 22:07:41 1994:

I just worked on a couple of minor details on /u/carl/bin/i.

It now allows more than one user, tests for non-existant users,
and includes more linefeeds.

Again, let me now if there's anything else you'd like to see
added or improved.



#6 of 16 by rcurl on Sat Sep 3 04:43:54 1994:

How would I write an alias/script to run that, from my directory?
Would it be worthwhile to also more the .profile?


#7 of 16 by popcorn on Mon Sep 5 22:24:31 1994:

This response has been erased.



#8 of 16 by rcurl on Thu Sep 15 15:21:24 1994:

Having been properly shamed (8-{), I wrote an alias for i in my .cshrc,
to call carl's i, and it works. But Valerie, don't you know you might
turn students off from learning by using this technique? Its unAmerican.


#9 of 16 by popcorn on Thu Sep 15 16:13:45 1994:

This response has been erased.



#10 of 16 by carl on Sat Sep 17 15:13:48 1994:

Sorry it took so long to respond...

The .profile is included in the finger information, and I didn't think
it was worth having it duplicated.

BTW, I didn't know I'd be learning about swordsmanship and educational
styles in this item.  Isn't life grand?  ;-)



#11 of 16 by janc on Sun Oct 22 03:18:41 1995:

Some new tools along similar lines:

  grabenv [-lw] login|tty|uid

This prints out the environment variables of any user logged in.  (You have
always been able to access this, but "ps -ewww" is a lot slower than grabenv).
You can name the user either by login, ttyname, or uid number.

Caveats:  this works by searching for a non-login process that the user is
running.  If the user only has a login shell running, it won't work.  The
environment variables printed are as they were set when the user started
whatever process the grabenv found was started.  They may or may not be
the current settings for his current foreground process.  (I should probably
make it smarter, prefering foreground processes to background processes and
newer processes to older ones).  Most newbies aren't doing anything fancy
enough to confuse grabenv, and most of them have some non-login processes
(eg, "write help"), so usually it will give you a pretty good snap-shot.

Normally the variables are clipped off at 79 columns so there is only one
variable per line.  If you want to see the full values, include the -w
flag.

The -l flag will make it print the environment of their login shell (as it
was at startup time) instead of a non-login shell.  With this you will
see TERM=network or TERM=dialup a lot.  It can help figure out problems
with tset.



  grabstty [-a] login|tty

This prints out the named user's stty settings so you can figure out what
interupts and such they have.  This information was not available until
I installed this command, but I don't think it is a very big invasion of
a user's privacy.

Caveats:  lots of programs (including "chat" and "tcsh") fiddle with user's
stty settings.  You don't usually see this when you do a "!stty" to print
your modes, because they all carefully put the modes back before running
other commands.  Most don't fool with interupt and backspace keys, and that
is what you mostly care about.

Normally it prints out only a few of the modes that I thought were more
interesting than others.  But if you give a -a flag, it prints them all.


There are "man" pages for both commands installed.


Both commands are pretty-darn-quick.  I carefully avoided going anywhere
near the passwd files so that even on a busy day, the helpseeker won't
give up on you while you are dredging up information.


#12 of 16 by kentn on Sun Oct 22 05:07:54 1995:

janc, both of those command are better than "pretty-darn-quick"--
they're damn-fast!  Very nice...


#13 of 16 by robh on Sun Oct 22 11:57:29 1995:

Yow!  This is exactly what I need!  Thanks, janc!


#14 of 16 by rcurl on Sun Oct 22 20:07:48 1995:

Us unix-dummie helpers are going to need a tutorial on what to do with
this new information. My ability to help fails when it comes to stty etc,
and I refer help-seekers to staff. Most of the help question I get
have nothing to do with unix stuff at this level, but concern "what can
I do here"? and why isn't my term set to vt100? and can I telnet....
but it wouldn't hurt to learn something new, so when will the first
helpers tutorial be?


#15 of 16 by janc on Mon Oct 23 01:31:24 1995:

I think maybe we should accumulate notes on answering common questions.

The kinds of situations I had in mind for "grabstty" were things like:
  - user complains about backspace not working.  Gives a quick check on what
    his backspace is set to.
  - Instead of telling a user to "hit interupt" you can say "hit control-C"
    and get it right.

Mostly "grabenv" is useful for looking at TERM settings.  There are three
things you can look at:
   grabenv -l
        TERM setting before execution of .login/.profile
   cat .login or .profile
        tset command used to change settings.
   grabenv
        TERM setting after execution of .login

This gives you a much more picture of what is going on than just looking at
the .profile.  In most cases you don't need all this, but from time to time
it can be helpful.


#16 of 16 by popcorn on Wed Oct 25 16:30:19 1995:

This response has been erased.

Response not possible - You must register and login before posting.

No Next Item No Next Conference Can't Favor Can't Forget Item List Conference Home Entrance    Help

- Backtalk version 1.3.30 - Copyright 1996-2006, Jan Wolter and Steve Weiss