Hi Sharon,
Well, it seems to work on most platforms. There is no problem on about
30 different UNIX and Linux systems, and several of them are Redhat;
there are just 3 of them that don't change the user ID. I suppose I
can start looking in the code for the process service; I just hoped
maybe somebody had seen this problem before.
When/if I find the solution, I'll let the list know.
Sharon Lucas wrote:
> Hi,
>
> I have no problem running a process as another user on our Red Hat Linux
> systems via a STAF PROCESS START request using the USENAME option. What
> makes you think the process is not being run as the specified userid? Try
> the following to show the user that the process is being run as.
>
> On a RHEL 4 system, I ran the "whoami" command (which shows the effective
> userid) and the "id" command (which shows real and effective UIDs and
> GIDs) and these commands show that the system is logged on as root (which
> it was when I started STAFProc). Then, I ran the "whoami" and the "id"
> commands via STAF PROCESS START requests specifying USERNAME "test" and it
> correctly shows that the process is being started under user "test".
>
> # cat /etc/redhat-release
> Red Hat Enterprise Linux AS release 4 (Nahant Update 9)
> # whoami
> root
> # id
> uid=0(root) gid=0(root)
> groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)
> context=root:system_r:unconfined_t
>
> # STAF local PROCESS START SHELL COMMAND "whoami" RETURNSTDOUT
> STDERRTOSTDOUT USERNAME test WAIT
> Response
> --------
> {
> Return Code: 0
> Key : <None>
> Files : [
> {
> Return Code: 0
> Data : test
>
> }
> ]
> }
> # STAF local PROCESS START SHELL COMMAND "id" RETURNSTDOUT STDERRTOSTDOUT
> USERNAME test WAIT
> Response
> --------
> {
> Return Code: 0
> Key : <None>
> Files : [
> {
> Return Code: 0
> Data : uid=500(test) gid=500(test)
> groups=0(root),1(bin),2(daemon),3
> (sys),4(adm),6(disk),10(wheel) context=root:system_r:unconfined_t
>
> }
> ]
> }
>
> --------------------------------------------------------------
> Sharon Lucas
> IBM Austin, [email protected]
> (512) 286-7313 or Tieline 363-7313
>
>
>
>
> From: "Andersen, Jan" <[email protected]>
> To: "staf" <[email protected]>,
> Date: 01/27/2012 01:49 AM
> Subject: [staf-users] PROCESS ... USERNAME .. doesn't always work?
>
>
>
> I have set up staf identically on a large number of UNIX servers, and in
> most instances it works fine, but on 3 of them (all Redhat linux) the
> userid doesn't get set in the PROCESS command. I have set PROCESSAUTHMODE
> to NONE and STAFProc runs as root, so it should work.
>
> What do you think is likely to be the reason?
>
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
> _______________________________________________
> staf-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/staf-users
>
>
>
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> staf-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/staf-users
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
staf-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/staf-users