This can be done easily in Perl, using the crypt() function. Now I need a Python function doing exactly the same encryption as the htpasswd command. Have tried to interact directly with the command, using the commands module, but since adding a user is a three step process, it didn't worked. Regards, Gustaf Liljegren