Operating System - HP-UX
1753529 Members
5110 Online
108795 Solutions
New Discussion юеВ

Re: Using the "su" without prompting for password

 
Admin.SIF
Frequent Advisor

Using the "su" without prompting for password

Is there any way to connect to a user account without be prompt for his password (like "# su - username" from root, but from a special user) ? And we can't use the "sudo" command, which use "root" as the special user.

We currently user "Autosys" which require a special user for starting batch process for the process' caller.
Sysd. Amin. Inforef
5 REPLIES 5
Victor BERRIDGE
Honored Contributor

Re: Using the "su" without prompting for password

I use rlogin for such case with a .rhost in the directory. Yes its silly but it works...
Demo:
alphard # id
uid=200(vbe) gid=2(bin)
alphard # rlogin alphard -l fru
alphard # rlogin alphard -l fru
Please wait...checking for disk quotas
(c)Copyright 1983-1997 Hewlett-Packard Co., All Rights Reserved.
(c)Copyright 1979, 1980, 1983, 1985-1993 The Regents of the Univ. of California
(c)Copyright 1980, 1984, 1986 Novell, Inc.
(c)Copyright 1986-1992 Sun Microsystems, Inc.
(c)Copyright 1985, 1986, 1988 Massachusetts Institute of Technology
(c)Copyright 1989-1993 The Open Software Foundation, Inc.
(c)Copyright 1986 Digital Equipment Corp.
(c)Copyright 1990 Motorola, Inc.
(c)Copyright 1990, 1991, 1992 Cornell University
(c)Copyright 1989-1991 The University of Maryland
(c)Copyright 1988 Carnegie Mellon University
(c)Copyright 1991-1997 Mentat, Inc.
(c)Copyright 1996 Morning Star Technologies, Inc.
(c)Copyright 1996 Progressive Systems, Inc.
(c)Copyright 1997 Isogon Corporation


RESTRICTED RIGHTS LEGEND
Use, duplication, or disclosure by the U.S. Government is subject to
restrictions as set forth in sub-paragraph (c)(1)(ii) of the Rights in
Technical Data and Computer Software clause in DFARS 252.227-7013.


Hewlett-Packard Company
3000 Hanover Street
Palo Alto, CA 94304 U.S.A.

Rights for non-DOD U.S. Government Departments and Agencies are as set
forth in FAR 52.227-19(c)(1,2).
alphard # id
uid=203(fru) gid=20()
alphard #
James R. Ferguson
Acclaimed Contributor

Re: Using the "su" without prompting for password

Hi:

No, you will always be interactively prompted for the password whenever you 'su - ' and you are not the root user.

...JRF...
Andreas Voss
Honored Contributor

Re: Using the "su" without prompting for password

Hi,

possibly you could use a suid script for your batch proedures:
chown : <script>
chmod ug+s <script>
Of course this sets only effective uid/gid not real but it may work for you.

Regards
Admin.SIF
Frequent Advisor

Re: Using the "su" without prompting for password

We currently look for the suid solution... I'll be back later with results.
Sysd. Amin. Inforef
Barry Goldstein
Occasional Contributor

Re: Using the "su" without prompting for password

Autosys sets the current user to the owner of the job in the Autosys database before executing a job. If you define the job owner as "user@host" then the job will run on machine "host" with the username "user". Separate the actions to be taken as a different user into different jobs and have the edit superuser change the owner fields of the jobs.
"The significant problems we face in life cannot be solved at the same level of thinking we were at when we created them." -- Albert Einstein