[Tutor] How to save password ?

McLaughlin, Toby tmclaughlin at csu.edu.au
Fri Oct 15 01:03:16 CEST 2004


Or again, you could take inspiration from the Unix authentication
mechanism.  Perhaps something like:
	Make your program setguid "myprog";
	Make the password file owned by group "myprog";
	Make the password file writable by group "myprog" but not by
ordinary users.

That way, only the program (or root) can write to the password file.
For more info, try googling for "shadow passwords" which is the Unix
mechanism to which I'm referring.

This is assuming that you are developing for a Unix like system of
course.

Also:
This is first post.  Hello everyone!

> -----Original Message-----
> From: tutor-bounces at python.org 
> [mailto:tutor-bounces at python.org] On Behalf Of Chad Crabtree
> Sent: Friday, 15 October 2004 6:04 AM
> To: Mark Kels
> Cc: tutor at python.org
> Subject: Re: [Tutor] How to save password ?
> 
> 
> Mark Kels wrote:
> 
> >Oh, ok, thanks.
> >But how can I save the hash so no one could change it but the app
> will
> >be able to access it  and compare it to the password the user enters
> ?
> >  
> >
> I don't think you can do this, you can just try to hide it or perhaps
> 
> you can encrypt the password file, but if someone is determined
> enough 
> then it will be broken in addition they can just open up the script
> and 
> modify out the password authentication.
> 
http://docs.python.org/lib/module-rotor.html

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
_______________________________________________
Tutor maillist  -  Tutor at python.org
http://mail.python.org/mailman/listinfo/tutor


More information about the Tutor mailing list