su'ing doesn't read /.cshrc

su'ing doesn't read /.cshrc

Post by Kanthan Pill » Thu, 15 Apr 1993 00:47:59




>Every other Unix box I've used reads /.cshrc when I su to root.
>That's where I've always set the prompt to be something that stands
>out as root (like having a # in it).  When I su, it doesn't read the
>.cshrc at all.  I do a 'source /.cshrc' and everything is fine, but
>that gets annoying.  Something simple?

>-rob


I have this problem on all System V-based systems. I keep around a copy
of the source for the bsd version of su, and hack it to run on whatever
systems I administer. Look at the bsd distribution in uunet.uu.net for
an example, or roll your own. If that's too complicated, use "su -"
instead of plain "su".

Actually, IBM does a more reasonable job here than the average System
V-based system which reads the *user* .cshrc instead of root's. Phew!

                                Kanthan Pillay
                                *space Administrator
                                C R S 4
                                Sardinia

* * * * *Centro di Ricerca, Sviluppo e Studi Superiori in Sardegna * * * * * *
*                                                                            *


*        Fax:  (39 70) 279-6220    uucp:     princeton!crs4!svpillay         *
*        Snail: Via Nazario Sauro, 10 - 09123 Cagliari, Italy                *
*                                                                            *
* * * Centre for Advanced Studies, Research, and Development in Sardinia * * *

 
 
 

1. Why doesn't my ppp-on script work when su'ing

If I run my ppp-on script on the local consol when logging in as root then
it dials and connects perfectly.  But when I telnet into my linux box, log
in as a user, then su to root and try to run the ppp-onn scripts it does
nothing.  It just returns to the comman propt without even dialing hte
modem.  How can't I get it to dial when I su in?

2. Data Base Question

3. su doesn't read user's shell init files?

4. Help with multi-homed server & automount

5. Issuing 'echo <ESC>[r' from .cshrc doesn't work, HELP

6. Problem with ports

7. *AGAIN* CSH - Execute `target' .cshrc with `su'

8. Canonical mode question

9. 'su ' vs. 'su -'

10. restrict use of 'su' or 'su -'

11. CSH - Execute `target' .cshrc with `su'

12. why 'su' command does not run .profile or .cshrc ?

13. 'su -c' doesn't work properly?