Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!apple!zorba!dtynan From: peter@aucs.UUCP (Peter Steele) Newsgroups: comp.unix Subject: Question on su -c option Message-ID: <3669@zorba.Tynan.COM> Date: 4 Jul 90 01:12:55 GMT Sender: dtynan@zorba.Tynan.COM Reply-To: uunet!aucs!peter (Peter Steele) Organization: School of Computer Science, Acadia Univ., Nova Scotia Lines: 24 Approved: dtynan@zorba.Tynan.COM Apparently-To: comp-unix@watmath.UUCP su - -c fred ls is supposed to login to account fred, execute ls, and then logout. This appears to work except that .login and .cshrc do not appear to be executed (nor .profile for that matter). I have oracle installed here and have to give a command in a startup script that looks like su - -c oracle tcpctl start but it doesn't work because there are a number of environment variables that are not set properly and so the tcpctl start command fails. I can get it to almost work using echo 'tcpctl start' | su - oracle The only problem this seems to cause is that the stty command in .login reports the error 'not a character device', but otherwise the login works okay. Does anyone know the proper way to do what I want? Thanks! -- Peter Steele, Microcomputer Applications Analyst Acadia University, Wolfville, NS, Canada B0P1X0 (902)542-2201x121 UUCP: {uunet|watmath|utai|garfield}!cs.dal.ca!aucs!Peter BITNET: Peter@Acadia Internet: Peter@AcadiaU.CA