tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Chris Bryant <Chris.Bryant@DTAG.Com>
Subject: SUMMARY: su $USER
Date: Thu, 30 Jan 2003 07:56:42 -0600	[thread overview]
Message-ID: <D6339830FC73944E889CC3CEADDB205B92B997@dtagpo1.tracs.com> (raw)

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<stdio.h>

 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


                 reply	other threads:[~2003-01-30 13:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox