https://bugzilla.novell.com/show_bug.cgi?id=406642


           Summary: System.Diagnostic.Process doesn't use credential info
           Product: Mono: Class Libraries
           Version: SVN
          Platform: i686
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]
         QAContact: [email protected]
          Found By: DeveloperNet


Hi
After trying all the day to start a process as root i think there is a litle
bug, this code below should start xterm as root user after yu will enter the
good password in the code (this code work great under windows if yu start
notepad as administrator) :

                Process VBmProcess = new Process();

                VBmProcess.StartInfo.FileName = "xterm";

                VBmProcess.StartInfo.UserName = "root";

                VBmProcess.StartInfo.UseShellExecute = false;

                VBmProcess.StartInfo.WorkingDirectory = "/usr/bin";

                VBmProcess.StartInfo.Arguments = "";

                VBmProcess.StartInfo.Domain = "my machine name";

                VBmProcess.StartInfo.CreateNoWindow = true;

                VBmProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;



                System.Security.SecureString SecPass = new
System.Security.SecureString();



                foreach (char unChar in "my root password")

                {

                    SecPass.AppendChar(unChar);

                }

                VBmProcess.StartInfo.Password = SecPass;



                VBmProcess.Start();

                VBmProcess.WaitForExit();


-- 
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.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to