nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

can u pls help

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 ...


Go Back   nixCraft Linux Forum > Linux Distribution > CentOS / RHEL / Fedora

Linux answers from nixCraft.


CentOS / RHEL / Fedora Discussion about Redhat Enterprise Linux or CentOS or Fedora Linux related problems.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 28-03-2008, 06:14 AM
Junior Member
User
 
Join Date: Mar 2008
OS: Debian
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
adam1979 is on a distinguished road
Default can u pls help

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.
Reply With Quote
  #2 (permalink)  
Old 28-03-2008, 08:55 AM
Member
User
 
Join Date: Mar 2008
OS: Debian, Slackware, LFS
Posts: 82
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 2
Tux-Idiot is on a distinguished road
Default

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
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT +5.5. The time now is 03:49 AM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38