[Mono-devel-list] Login application

Jurandy Martins Soares Junior jurandy at lsd.ic.unicamp.br
Tue Aug 10 10:15:47 EDT 2004

Hi, all!

I'm new in the list (but not in C#).

Does anyone know how to write in C# a sample application for login?

Something similar to the one below, written in Python.

Jurandy Martins

import crypt, getpass, pwd

def login():
    username = raw_input('Python login:')
    cryptedpasswd = pwd.getpwnam(username)[1]
    if cryptedpasswd:
        if cryptedpasswd == 'x' or cryptedpasswd == '*':
            raise "Sorry, currently no support for shadow passwords"
        cleartext = getpass.getpass()
        if crypt.crypt(cleartext, cryptedpasswd[:2]) == cryptedpasswd:
            print "Authentication succeed!"
            print "Failure login!"


More information about the Mono-devel-list mailing list