From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Chris Bryant Newsgroups: gmane.os.tru64.managers Subject: SUMMARY: su $USER Date: Thu, 30 Jan 2003 07:56:42 -0600 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: main.gmane.org 1043942361 16614 80.91.224.249 (30 Jan 2003 15:59:21 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 30 Jan 2003 15:59:21 +0000 (UTC) Return-path: Original-Received: from sws1.ctd.ornl.gov ([160.91.22.101]) by main.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 18eH5Q-0004Fy-00 for ; Thu, 30 Jan 2003 16:58:45 +0100 Original-Received: (qmail 28162 invoked by uid 5); 30 Jan 2003 16:00:23 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 28145 invoked by uid 49493); 30 Jan 2003 16:00:22 -0000 Original-Received: from Chris.Bryant@DTAG.Com by sws1 by uid 49491 with qmail-scanner-1.14 (clamscan: 0.54. spamassassin: 2.50-cvs. Clear:SA:0(-1.2/5.0):. Processed in 0.979322 secs); 30 Jan 2003 16:00:22 -0000 Original-Received: from unknown (HELO emroute2.cind.ornl.gov) (128.219.159.41) by 0 with SMTP; 30 Jan 2003 16:00:21 -0000 Original-Received: from emroute2.cind.ornl.gov (LOCALHOST [127.0.0.1]) by emroute2.cind.ornl.gov (PMDF V6.1-1 #30669) with ESMTP id <0H9J00EJ3B4G68@emroute2.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Thu, 30 Jan 2003 11:00:21 -0500 (EST) Original-Received: from tfyfw.thrifty.com ([65.64.34.2]) by emroute2.cind.ornl.gov (PMDF V6.1-1 #30669) with ESMTP id <0H9J00DKDB4ALS@emroute2.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Thu, 30 Jan 2003 11:00:12 -0500 (EST) Original-Received: by tfyfw.thrifty.com; id KAA17069; Thu, 30 Jan 2003 10:03:12 -0600 (CST) Original-Received: from unknown(172.23.116.35) by tfyfw.thrifty.com via csmap (V1.5) id srcAAA0AQm71; Thu, 30 Jan 2003 10:03:12 -0600 Original-Received: by dtagimc.thrifty.com with Internet Mail Service (5.5.2653.19) id ; Thu, 30 Jan 2003 10:00:09 -0600 Original-To: "Tru64 Unix \(tru64-unix-managers@ornl.gov\)" X-Mailer: Internet Mail Service (5.5.2653.19) Xref: main.gmane.org gmane.os.tru64.managers:3150 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:3150 Thanks to Darryl Cook, Dr. Thomas Blinn, and James Sainsbury for their responses. It was James Sainsbury that came up with the easiest solution. Basicly his suggestion was to write a C program to execute the script that would normally be executed in this accounts .profile and place the c programs path in the shell portion of the accounts /etc/passwd entry. I did this and now when anyone su, su - , logs in direct, it will not take them to a command line. The source code is as follows: #include main() { system("/usr/local/bin/script"); /* place script you want to execute here */ } Thanks again, Chris -----Original Message----- Admins, I have an account which I have set up on a 5.1 UNIX machine which when executing the accounts profile ( via a direct login or a su - $USER ) will execute a shell script for them. However, when someone executes a su $USER from the command line will take them into a shell prompt. Now I am wanting anyone who uses this account to have to login directly and not have the functionality of su, however I am not sure how to disable this for one user. Any ideas? I will summarize. TIA, Chris Bryant Unix Administrator Dollar Thrifty Automotive Group