Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!sri-spam!sri-unix!hplabs!hp-sdd!artecon!jay From: jay@artecon.UUCP Newsgroups: comp.unix.wizards Subject: Csh invocation with euid root looks at group of .cshrc! Message-ID: <348@artecon.artecon.UUCP> Date: Thu, 5-Feb-87 13:30:00 EST Article-I.D.: artecon.348 Posted: Thu Feb 5 13:30:00 1987 Date-Received: Sat, 7-Feb-87 18:09:34 EST Reply-To: jay@artecon.UUCP () Distribution: na Organization: artecon Lines: 42 Am I missing something obvious here? I'm running Sun 3.2, and have had (for several years) the following convenience program installed as 4750 root wheel: main(argc, argv) int argc; char **argv; { char host[12]; char cmd[100]; setreuid(0,0); if (argc == 1) { system("/bin/csh"); } else { sprintf(cmd, "/usr/ucb/rlogin %s", *++argv); system(cmd); } } My .cshrc is 600 jay artedev, with the following lines at the top: if (`whoami` == "root") then source /usr2/jay/.rootaliases exit endif #lots of aliases, etc below ".rootaliases" contains a subset of my usual aliases for use with the root shell and is 640 root wheel. This all works fine when protections/group are set up as above. However, if I "chgrp wheel" my .cshrc (changing nothing else), my .cshrc no longer gets sourced when invoking the program (the invocation is without argument), hence neither does .rootaliases. Yes, I did say that my .cshrc was "600", and I am a member of both groups. ?WHY? Thanks in Advance, -*jay Jay Schlegel sdcsvax!{hp-sdd,telesoft}!artecon!jay seismo!esosun!