[Twisted-Python] Server authentication
orlenko at gmail.com
Tue Jan 16 21:19:51 EST 2007
To delegate user authentication to Windows, you can use win32security
from win32security import LogonUser, LOGON32_LOGON_NETWORK,
from win32security import error as LogonError
def validate_password(username, domain, password):
except LogonError, e:
print 'No:', e
To use LogonUser(), calling process needs to have some special
privileges, at least on Win2K. If I remember correctly, SE_TCB_NAME is
Hope this helps,
Martin Evans wrote:
> I'm currently implementing a proprietary set of protocols for
> interacting with twisted running on a Microsoft server. All is working
> fine so far using the basic line receiver / raw methods.
> I was hoping to add a form of authentication to the protocol. Is there
> anyway to interact with the existing accounts on the server?
> The client wishes to make use of some of the lock down facilities
> based on the Microsoft Server accounts. ie in the same way MS Telnet
> server allows you to logon and then be taken to your own folder. I
> have taken a quick look at the cred module but have not seen anything
> suitable yet.
> I am currently running "python twistd.py -y myserver.nac"
> If such a module has not been developed, I assume I could develop a C
> extension module of some sort.
> Any pointers would be a appreciated. Thanks.
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
More information about the Twisted-Python