[Mono-bugs] [Bug 653564] Erroneous value returned by Environment.UserName when running as root with su

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Nov 15 10:03:43 EST 2010



--- Comment #2 from Antonio Anzivino <djechelon at fastwebnet.it> 2010-11-15 15:03:43 UTC ---
No comment on how Unix does, but if you run "whoami" after running su, you get
root, instead, if you run the sample application with su (again, **not** sudo)
you get the regular user's name.

I tried to run whoami in 3 different conditions:

djechelon at MONSTR:~> whoami
djechelon at MONSTR:~> sudo whoami
root's password:
djechelon at MONSTR:~> su
MONSTR:/home/djechelon # whoami

Instead in the previous example, running mono Whoami.exe after being su returns
djechelon, which is inconsistent to whoami command. That's the point...

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list