running a command from root as another user

From: David Bremer <DaveB_at_healthotago.co.nz>
Date: Mon, 21 Apr 1997 10:18:30 +1200

I can't help thinking that I'm going about this all wrong - but anyway
....

I'm trying to smooth out the process of adding users to a database.

Process:
Add unix account with /usr/sbin/adduser
su to the dba account (runs in csh (yuk) and loads all kinds of aliases
& env vars)
run a script (csh) that gives the user access to the database

I would like to include a line at the bottom of adduser that does
something like
su - dba < addDBuser

so that the systems operator doesn't have to do the su & enter another
command.

Is this possible?

any other suggestion?

cheers


Dave

--
Clinical Account Manager, Information Systems
Healthcare Otago (Dunedin NZ)
Ph external: 03 - 4740999
Ph internal: NB CHANGE extn 8830 
email: daveb_at_healthotago.co.nz
Pretentious quote of the week/month (whatever):
"When a process is created, its parent process ID is the process ID of
its parent process."
man pages ..... ya gotta love em!
Received on Mon Apr 21 1997 - 00:28:58 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:36 NZDT