>From the manual:

Note: The PROCESSAUTHMODE operational parameter must be enabled in the STAF 
configuration file on the system where the process is run under a different 
username. See 4.7, "Operational parameters" for more information on how to 
enable the PROCESSAUTHMODE operational parameter. There are additional 
requirements that must be met to run a process under a different username on a 
Windows system. See "Starting a Process Under a Different User on Windows" for 
more information.

[...]

PROCESSAUTHMODE specifies the mode by which usernames/passwords are 
authenticated when starting processes. The value of this option is platform 
specific. Recognized values are the following:

DISABLED - This indicates that the user may not specify a username/password 
with which to authenticate when starting a process. This mode is available on 
all platforms. This is default mode.
WINDOWS - This indicates that windows-based authentication should be used. 
This mode is only available on Windows systems. See "Starting a Process Under 
a Different User on Windows" for more information.
NONE - This indicates that usernames will be honored but not authenticated. In 
this mode, passwords are ignored and processes are started under the indicated 
username. This mode is only available on Unix systems.


Have you set that parameter?


On Thursday 14 April 2011 12:45:57 sanjeev.lohc...@emc.com wrote:
> I tried without the "su -", but the command fails since the command has to
> be run as db2inst1 and since the staf is running as root.  So I have only
> this workaround to run with su - option.
> 
> Regards
> Sanjeev
> 
> -----Original Message-----
> From: Stefano Guandalini [mailto:stefano.guandal...@gmail.com]
> Sent: Thursday, April 14, 2011 4:02 PM
> To: staf-users@lists.sourceforge.net
> Cc: Lohchab, Sanjeev
> Subject: Re: [staf-users] Starting a process with different user on Linux
> (RHEL4)
> 
> Have you tried the same without the "su - db2inst1 - ..." part?
> I'm not using the internal staf process service, but I know that the STAX
> process tag is using it and I'm not using the "su - username" in command
> tag.
> 
> On Thursday 14 April 2011 12:14:29 sanjeev.lohc...@emc.com wrote:
> > Hi,
> > 
> > I am automating the DB2 interface to our product.
> > 
> > I have started the staf as root, now I am trying to run the DB2 commands
> > using staf process.  I ran the following command:
> > 
> > staf local process start shell "su - db2inst1 -c %C" command
> > "/home/db2inst1/sqllib/bin/db2" parms "list database directory" username
> > db2inst1 returnstdout returnstderr wait
> > 
> > but it is giving error:
> > 
> > Response
> > --------
> > {
> > 
> >   Return Code: 1
> >   Key        : <None>
> >   Files      : [
> >   
> >     {
> >     
> >       Return Code: 0
> >     
> >       Data       :
> >     }
> >     {
> >     
> >       Return Code: 0
> >       Data       : standard in must be a tty
> >     
> >     }
> >   
> >   ]
> > 
> > }
> > 
> > I tried googling for this error, but couldn't get any help.  I would
> > appreciate if any of the experts help me in resolving this issue.
> > 
> > Regards
> > Sanjeev
> > 
> > 
> > -------------------------------------------------------------------------
> > -- --- Benefiting from Server Virtualization: Beyond Initial Workload
> > Consolidation -- Increasing the use of server virtualization is a top
> > priority.Virtualization can reduce costs, simplify management, and
> > improve application availability and disaster protection. Learn more
> > about boosting the value of server virtualization.
> > http://p.sf.net/sfu/vmware-sfdev2dev
> > _______________________________________________
> > staf-users mailing list
> > staf-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/staf-users
-- 
Stefano Guandalini
Mobile Quality Assurance
Dada.net S.p.A.
+393666000995
stefano.guandal...@gmail.com

------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to