Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!clyde.concordia.ca!IRO.UMontreal.CA!kovic.IRO.UMontreal.CA!quennevi From: quennevi@IRO.UMontreal.CA (Charles Quenneville) Newsgroups: comp.unix.questions Subject: comp.unix.wizards Message-ID: <1990Dec8.215719.15358@IRO.UMontreal.CA> Date: 8 Dec 90 21:57:19 GMT Sender: news@IRO.UMontreal.CA Organization: Universite de Montreal Lines: 35 Hello! I would like to implement a password security in a program. For example, I want to put in a public directory a program for just a certain number of users (of different groups). I have thought of using getpass() but if I do so, it would be easy for someone to use `strings' and find the password. So what I would like to do is simple: ask for the userid ask for the password compare the userid and the password in a *LOCAL* file if everything is ok, proceed else kaboum! The local password file could contain 2 fields: userid:encrypted password I know I could crypt the program and then give the key to the people who would want to run the program. That's not what I want to do. Plus, could anyone tell me how to extract the fields in the /etc/passwd file? Either by using the structure in the pwd.h file or simply by using for's and while's. A last question: Could you tell me what gecos means? Thank you very much in advance. -- Charles Quenneville quennevi@kovic.iro.umontreal.ca