Interact with the console in Linux

View: New views
2 Messages — Rating Filter:   Alert me  

Interact with the console in Linux

by Hoqenishy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi, folks - I've got a quick question that hopefully has an easy resolution... how can I pass commands to the console in Linux from a C# app? It's fairly easy to do in Windows from C#, but nothing I try in Mono seems to do the trick. I'm trying to automate password synchronization between Samba, passwd, and some database applications, and it would be REALLY handy if I could manage to do it with a C# app.

Any help would be greatly appreciated. Thanks!

Re: Interact with the console in Linux

by Madars Vitolins :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I use following script for password samba/ldap password change:

$ cat chpass
#! /bin/sh

    {
    echo "$2"
    echo "$2"
    } | /usr/sbin/smbldap-passwd "$1"


here is no magic, just call that chpass with <username> <password> arguments...

Madars.



On 6/22/07, Hoqenishy <monodev.dsbl@...> wrote:

Hi, folks - I've got a quick question that hopefully has an easy
resolution... how can I pass commands to the console in Linux from a C# app?
It's fairly easy to do in Windows from C#, but nothing I try in Mono seems
to do the trick. I'm trying to automate password synchronization between
Samba, passwd, and some database applications, and it would be REALLY handy
if I could manage to do it with a C# app.

Any help would be greatly appreciated. Thanks!
--
View this message in context: http://www.nabble.com/Interact-with-the-console-in-Linux-tf3961728.html#a11243045
Sent from the Mono - General mailing list archive at Nabble.com.

_______________________________________________
Mono-list maillist  -  Mono-list@...
http://lists.ximian.com/mailman/listinfo/mono-list


_______________________________________________
Mono-list maillist  -  Mono-list@...
http://lists.ximian.com/mailman/listinfo/mono-list