1 """Winnt access into /etc/passwd via account name"""
6 def getpwname( name, pwfile='/etc/passwd' ):
7 "Get password record that matches the specified name"
9 _fd = open( pwfile, 'r' )
11 sys.stderr.write("Error unable to locate" + pwfile + "\n")
12 sys.stderr.write("Consult gnu-win32 command mkpasswd\n")
18 for _line in string.split(_data, '\n'):
19 _record=string.split( _line, ':' );
20 if _record[0] == name:
25 pw = getpwname( 'jeff' )
28 if __name__ == '__main__':