home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!haven.umd.edu!umd5!oberon.umd.edu!matthews
- From: matthews@oberon.umd.edu (Mike Matthews)
- Newsgroups: comp.sys.next.sysadmin
- Subject: Re: loginwindow hooks- ARGHHHH!!!!
- Message-ID: <17116@umd5.umd.edu>
- Date: 21 Nov 92 21:29:54 GMT
- References: <1992Nov20.015714.21620@murdoch.acc.Virginia.EDU> <By08zy.Bw2@ux1.cso.uiuc.edu> <1992Nov20.134347.9096@ifi.unizh.ch>
- Sender: news@umd5.umd.edu
- Organization: /etc/organization
- Lines: 44
-
- In article <1992Nov20.134347.9096@ifi.unizh.ch> lytras@avalon.physik.unizh.ch (Apostolos Lytras) writes:
- >Argghhh.... root runs shellscripts!! DON'T DON'T DON'T! A shellscript
- >that is run by root *is* a threat to the security of your system and
- >possibly of many other systems as well. Especially when it is supposed
- >to run inattendedly.
-
- Bull.
-
- Do you know how many shell scripts there are on your system? How 'bout
- /etc/rc? Guess who runs it.
-
- SETUID shell scripts, now there's a problem. Not to mention *writeable*
- shell scripts that root runs.
-
- >Besides, your programs look like a lot of redundancy to me. Every Login
- >and Logout gets logged (with time, connecting host etc.) in
- >/usr/adm/wtmp. There is also information about shutdowns, reboots and
- >crashes in that file.
-
- Until NeXTstep 3.0, console logins weren't logged anywhere except maybe
- process accounting if you do that (and everyone should; can't hurt and it's
- of great help to determine what went wrong).
-
- >Cheers
- >- A.
-
- If you want to give users a login hook, uh, hook, just have a little check
- like:
-
- if [ -f /users/home/dir/$1/.loginhook ]; then
- /bin/su - $1 -c /users/home/dir/$1/.loginhook
- fi
-
- Runs their file $HOME/.loginhook as them. Does anyone know of a way to
- specify a home dir of a user other than your own? There's always finding it
- out via getpwent'isms, but something like ~$1 in sh. I know you can always
- write it in csh, but, well, I don't want to.
- ------
- Mike Matthews, matthews@oberon.umd.edu (NeXTmail accepted)
- ------
- Skinner's Constant (or Flannagan's Finagling Factor):
- That quantity which, when multiplied by, divided by, added to,
- or subtracted from the answer you get, gives you the answer you
- should have gotten.
-