|
|
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.
Thanks! (It always annoys me, not being able to finger someone while talking to them because it takes so long.)
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 ?
Sadly, carl, I got the same thing.
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.)
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.
How would I write an alias/script to run that, from my directory? Would it be worthwhile to also more the .profile?
This response has been erased.
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.
This response has been erased.
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? ;-)
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.
janc, both of those command are better than "pretty-darn-quick"-- they're damn-fast! Very nice...
Yow! This is exactly what I need! Thanks, janc!
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?
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.
This response has been erased.
Response not possible - You must register and login before posting.
|
|
- Backtalk version 1.3.30 - Copyright 1996-2006, Jan Wolter and Steve Weiss