tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY: su $USER
@ 2003-01-30 13:56 Chris Bryant
  0 siblings, 0 replies; only message in thread
From: Chris Bryant @ 2003-01-30 13:56 UTC (permalink / 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-01-30 13:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-30 13:56 SUMMARY: su $USER Chris Bryant

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