[Mono-dev] UserName/Password not being used by Process/ProcessStartInfo?

ray2k ray.oneill at gmail.com
Thu Feb 16 06:03:35 UTC 2012


I'm trying to have a simple mono exe invoke a shell command via
System.Diagnostics.Process

Here's the HelloWorld.exe


And here's the invoker:

      
This is mono 2.10.2 installed via yum on amazon linux (x64) in EC2.
/monotest has full access for ec2-user, testuser (a non-admin user i
created), and root obviously. Mono is installed in /opt/novell/mono

So, being in an ssh session as ec2-user:
If I do a /mono HelloWorld.exe/ by itself as ec2-user it prints ec2-user, if
I run it via sudo it shows root, alls well. But when I run /mono
HelloWorldInvoker.exe testuser testuserpassword/ as ec2-user, I see:
Invoking HelloWorld.exe as testuser
HelloWorld
Environment.UserName = ec2-user
Environment.MachineName = domU-12-31-38-04-24-38
Environment.UserDomainName = domU-12-31-38-04-24-38

Note the disparity between 'Invoking HelloWorld.exe as testuser' and
'Environment.UserName = ec2-user'. What gives? I know slightly more than
nothing about linux- is this related to its shell/security posture or
something? Shouldn't I be seeing Environment.UserName = testuser?




--
View this message in context: http://mono.1490590.n4.nabble.com/UserName-Password-not-being-used-by-Process-ProcessStartInfo-tp4393081p4393081.html
Sent from the Mono - Dev mailing list archive at Nabble.com.


More information about the Mono-devel-list mailing list