Hi,
The C code is answering my question. Thanks to Robert Mulley.
Besides, I got many other reponses ... thanks to them as well:
Salvatore J Guercio
Stan Horwitz
Martin Barret
Thanks & rgds
Ronny Yusniawan
E-mail: ryusniawan_at_hotmail.com
-------------------------------------------
Hello,
I don't know how you would do this using permissions etc... but you could do
something along these lines.
1. Write a C program
#include <stdlib.h>
int main( int argc, char **argv )
{ char *command; int i;
command = malloc( 255 );
if ( argc > 1 )
{
strcpy( command, "/usr/bin/su" );
for( i=1;i<argc;i++ )
{
strcat( command, " " );
strcat( command, argv[i] );
}
setuid( 0 );
system( command );
}
}
After compiling this program as "su2" and chmod 4700 and chown root. You can
then type:su2 - usernameand you should become that user.
Another way would be to modify this program so that the setuid( 0 ) was
setuid(uid ) and executing /bin/ksh or something. Once again needs to be
chmod 4700 chown root.
This is not the sort of program you want lying around for everyone to use.
Robert Mulley
Unix Admin
-----Original Message-----
From: Ronny Yusniawan [mailto:ryusniawan_at_hotmail.com]
Sent: 25 September 2000 22:00
To: tru64-unix-managers_at_ornl.gov
Subject: su command without password entry from non 'root' account
Hi Managers,
We have Tru64Unix v4.0F which is running in Alpha DS20.
As we know, from 'root' account if we issue 'su' command to substitute into
some other account ID, the password entry is skipped (no need to key in a
password to access).
Question:
What should I do if I want to have another account ID that has such
capability (substitute to another ID without password entry)?
Appreciate for the response.
Thanks alot & best regards.
Ronny Yusniawan
E-mail : ryusniawan_at_hotmail.com
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at
http://www.hotmail.com.
Share information about yourself, create your own public profile at
http://profiles.msn.com.
Received on Wed Nov 15 2000 - 06:11:24 NZDT