tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Ronny Yusniawan <ryusniawan () hotmail ! com>
To: tru64-unix-managers
Subject: SUMMARY:su command without password entry from non 'root' account
Date: Wed, 15 Nov 2000 06:09:03 +0000	[thread overview]
Message-ID: <97426854302944.tru64-unix-managers.marc@archive.invalid> (raw)

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@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@hotmail.com]
Sent: 25 September 2000 22:00
To: tru64-unix-managers@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@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.

                 reply	other threads:[~2000-11-15  6:09 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