This is a discussion on can u pls help within the CentOS / RHEL / Fedora forums, part of the Linux Distribution category; In systems that offer many user services, it is common to have password files associated with each service. Your task ...
|
|||||||
| Register | FAQ | Members List | Calendar | Forgotten your password? | Mark Forums Read |
|
|||
|
In systems that offer many user services, it is common to have password files associated with each service. Your task is to develop a system administration tool (called passwdmgr) that will allow users to update all their passwords.
Essentially you need to write a perl program, that performs several functions. Each function is determined by a command line switch. Each function is defined below: -a adds a user to the database file called passwd. With the -a switch the program accepts a user-id and then prompts for a password, and a conformation. The username and password are then added to the passwd file. An excerpt from the passwd file looks like this: <user-id>:<encrypted password> A typical session looks like this: % passwdmgr -a mbhattac Adding user mbhattac Enter password: <text not echoed to screen> Re-enter password: <text not echoed to screen> Passwords match. User added to file. -u updates a user's password. The -u switch accepts a user-id and prompts for a new password. This function then scans other password files and updates any password fields associated with that user-id. Sample password files will be provided via the forum. A typical session looks like this: % passwdmgr -u mbhattac Updating mbhattac Enter current password: Enter new password: Re-enter new password: Passwords match. Passwd file updated. smbpasswd: user-id found, updated. yppasswd: user-id not found. httppasswd: user-id found, updated. -d delete user. The -d switch removes a user from the passwd file. A typical session with the -d switch is given below: % passwdmgr -d mbhattac Deleting mbhattac. Passwd file updated. -h help. This function should print a useful help message to the screen on how to use this utility, and detail the purpose and function of each switch. Bonus marks will be given for programs that complete one or more of the following: · test passwords for common words; · offer the user randomly generated passwords; and · email the system administrator (you), every time a failed update occurs. |
| Sponsored Links | ||
|
|
|
|||
|
aptitude --help
aptitude install adduser-ng man adduser-ng man shadow man pwconv man pwunconv this is what they have done ages ago. why reinventing the wheel? encrypted password using either blowfish or twofish Crypt::Blowfish - Perl Blowfish encryption module - search.cpan.org Twofish security paranoid? try RSA 2-factor 4096 bit encryption cracklib gnupg openssl heimdal |