Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
11-29-2003, 03:08 PM
|
#1
|
|
Member
Registered: Sep 2003
Distribution: SuSE, Linspire, Fedora, RH Enterprise
Posts: 89
Rep:
|
Help: Need random password generator
Need random password generator from a reliable source.
I wont download from small unknown web sites.
This is what I used on Windows, but need a replacement
for SuSE 9.0 Pro.
http://quickysoftware.com/passwordgenerator.html
THX
|
|
|
|
11-29-2003, 04:13 PM
|
#2
|
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
Here you go I just wrote you one:
Code:
#!/usr/bin/perl
if($ARGV[0]>5 && $ARGV[0]<20){
@chars = ('a'..'z', 'A'..'Z', '0'..'9', '.', '!');
for($a=0;$a<$ARGV[0];$a++){print $chars[int(rand(@chars))]}
}
else{print "Please pass the length of password you want as an argument\nIt must be between 5 and 20"}
print "\n";
exit;
|
|
|
|
11-29-2003, 05:43 PM
|
#3
|
|
Member
Registered: Aug 2003
Location: South Africa
Distribution: Ubuntu (Feisty)
Posts: 280
Rep:
|
i have emerged an app on my gentoo system, its called makepasswd, and obviously it generates passwords 
here's the homepage of the application: http://packages.debian.org/stable/admin/makepasswd.html
[edit]
i just found another app, but i haven't tried it though:
http://sourceforge.net/projects/pwgen/
[/edit]
Last edited by chup; 11-29-2003 at 05:48 PM.
|
|
|
|
11-29-2003, 09:43 PM
|
#4
|
|
Member
Registered: Nov 2001
Location: California
Distribution: Slackware 14.0
Posts: 265
Rep:
|
I'm not positive about Suse, but you should have a program already installed called "mkpasswd". Type "man mkpasswd" for options and examples.
Speck
|
|
|
|
12-02-2003, 03:30 AM
|
#5
|
|
Member
Registered: Sep 2003
Distribution: SuSE, Linspire, Fedora, RH Enterprise
Posts: 89
Original Poster
Rep:
|
Hmm, looking for more of a GUI program to generate between 10 and 20 passwords
at a time so that I can copy and paste them for some customers.
Trying to install pwgen, but I dont think there is any documentation.
|
|
|
|
12-02-2003, 01:01 PM
|
#6
|
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
Then why not use an adapted version of my script above. Create a file called "/usr/bin/makepass.pl" with:
Code:
#!/usr/bin/perl
&genpass;
sub genpass{
$choice="";
$length="";
$num="";
while($length<5 || $length>20){
print "\nPlease the length for the passwords between 5 & 20: ";
$length=<STDIN>;
chop $length;
}
while($num<1 || $num>25){
print "\nPlease the number of passwords you want between 1 and 25: ";
$num=<STDIN>;
chop $num;
}
@chars = ('a'..'z', 'A'..'Z', '0'..'9', '.', '!');
for($a=0;$a<$num;$a++){
for($b=0;$b<$length;$b++){
print $chars[int(rand(@chars))];
}
print "\n";
}
while($choice ne "y" && $choice ne "n"){
print "\nDo you want to go again? (y/n): ";
$choice=<STDIN>;
chop $choice;
}
if($choice eq "y"){&genpass;}
}
exit;
make it executable:
chmod 755 /usr/bin/makepass.pl
You can then run "makepass.pl" from a terminal or to make it act more like a gui app make a shortcut/menu item to:
xterm -e "/usr/bin/makepass.pl"
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 05:59 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|