Password Protection using Term::ReadKey


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Password Protection using Term::ReadKey
# 1  
Old 05-26-2011
Password Protection using Term::ReadKey

Hi Friends,

I execute a perl script with password as input but i wish not to print the password when i give the input. Instead when i provide the password it could be shown as "****" instead of original password. I know we can use Term::ReadKey or IO::Prompt for this, but just wanted to know if i need to install them locally. Can i download the package and share it in a shared directory so that i can execute it from any host. I tried this but when i use the shared path in script use lib <shared-directory> doesnt work. Is Term::ReadKey install independent module? If not is there any other way of doing the same? Thanks in advance.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Forum Support Area for Unregistered Users & Account Problems

Password sent via reset password email is 'weak' and won't allow me to change my password

I was unable to login and so used the "Forgotten Password' process. I was sent a NEWLY-PROVIDED password and a link through which my password could be changed. The NEWLY-PROVIDED password allowed me to login. Following the provided link I attempted to update my password to one of my own... (1 Reply)
Discussion started by: Rich Marton
1 Replies

2. Shell Programming and Scripting

Password protection in unix

How to create a file in UNIX which is password protected ? Thanks and Regards, Neeraj (5 Replies)
Discussion started by: neeraj617
5 Replies

3. Shell Programming and Scripting

uuencode - .csv file password protection

HI, Can we add password protection for attachment of .CSV file in below command or any alternative solution. uuencode ../reports/gtsa_lmt_pb_rfs_daily.txt gtsa_lmt_pb_rfs_daily-$FILDTE.csv |mailx -s "gtsa_lmt_pb_rfs_daily" $MAILTO Many thanks regards, Sampath (4 Replies)
Discussion started by: Sampath.Rachcha
4 Replies

4. UNIX for Dummies Questions & Answers

Zip file with password protection

I am trying to zip a file with password protection. I have read all or atleast most of the threads on the website, but couldn't come up with a solution. I am running ZIP version 2.3 on HP-UX but I dont see the -P (password) option. I read somewhere that free versions of zip don't come with... (5 Replies)
Discussion started by: pintu
5 Replies

5. UNIX for Dummies Questions & Answers

Syntaxt to zip a file with password protection

Hi Experts, I am an SAP ABAP developer and compleatly stranger to unix and I need a help to extend a small peice of code. Our requirement is to zip a file with password protection in a specified directory. Following is the code I am using to zip a file ZZZZ.TXT. Here YYYY = is the path... (3 Replies)
Discussion started by: veeru4all
3 Replies

6. Shell Programming and Scripting

Search term and output term in desired field

Hi All, I have an input_file below and i would like to use Perl to search for the term "aaa" and output the 3rd term in the same row as "aaa".For Example, i want to search for the term "ddd" and would want the code to ouput the 3rd term in the same row which is "fff". Can somebody help ? ... (28 Replies)
Discussion started by: Raynon
28 Replies

7. AIX

File password protection/encryption

Can it be done? Ive read in a few places that the crypt program no longer exists on AIX...if its do-able please tell me how. (2 Replies)
Discussion started by: rdudejr
2 Replies

8. UNIX for Advanced & Expert Users

Does unix has password protection for zip files?

How to set password in zip files under unix? There are password protection available in various os. Does unix has password protection for zip files? Is zip and gzip command has it? (6 Replies)
Discussion started by: p_prathaban
6 Replies

9. Programming

Create a Term & Run chars on this Term

hi floks ! i'd like to know how can i transmete a character or a string from my source code to a term and make it interpret or un by the shell wich is running in my term. I'd like to create a Term from my code (and get its file descriptor) and then transmete each char typed on the keyboard to... (1 Reply)
Discussion started by: the_tical
1 Replies

10. UNIX for Dummies Questions & Answers

Installing Perl Module Term::ReadKey??? HELP!!!

I'm new to UNIX..... I'm trying to test a software that requires Perl. I installed Perl 5.004_04 without any problem on a UNIX SCO OpenServer Machine. The software I'm testing also requires some Perl Modules (Net::Telnet, Test::More, Net::Telnet::Cisco & Term::ReadKey). I installed... (4 Replies)
Discussion started by: rrivas
4 Replies
Login or Register to Ask a Question
Password(3pm)						User Contributed Perl Documentation					     Password(3pm)

NAME
DBIx::Password - Allows you to create a global password file for DB passwords SYNOPSIS
use DBIx::Password; my $dbh = DBIx::Password->connect($user); my $dbh = DBIx::Password->connect_cached($user); $dbh->getDriver; DBIx::Password::getDriver($user); DBIx::Password::checkVirtualUser($user); DBIx::Password::clearConfig(); DBIx::Password::readConfig("$ENV{HOME}/.my.secret.file"); DESCRIPTION
Don't you hate keeping track of database passwords and such throughout your scripts? How about the problem of changing those passwords on a mass scale? This module is one possible solution. It stores all your virtual users and data in /etc/dbix-password.conf. For each user you need to specify the database module to use, the database connect string, the username and the password. You will have to give a name to this virtual user. You can add as many as you like. I would recommend that if you are only using this with web applications that you change the final permissions on this package after it is installed in site_perl such that only the webserver can read it. A method called getDriver has been added so that you can determine what driver is being used (handy for working out database indepence issues). If you want to find out if the virtual user is valid, you can call the class method checkVirtualUser(). It returns true(1) if the username is valid, and zero if not. Once your are done you can use the connect method (or the connect_cache method) that comes with DBIx-Password and just specify one of the virtual users you defined while making the module. BTW I learned the bless hack that is used from Apache::DBI so some credit should go to the authors of that module. This is a rewrite of the module Tangent::DB that I did for slashcode. If your program does not need the system-wide information stored in the /etc/dbix-password.conf file, you may use the clearConfig() and readConfig() functions to get the data from another source. At any time, readConfig() may also be used to merge the data from another file into the currently-loaded configuration. Hope you enjoy it. HOME
To find out more information look at: http://www.tangent.org/DBIx-Password/ AUTHOR
Brian Aker, brian@tangent.org SEE ALSO
perl(1). DBI(3). perl v5.10.0 2009-05-09 Password(3pm)