[SOLVED] uuencode for random password generation with /dev/urandom
SUSE / openSUSEThis Forum is for the discussion of Suse Linux.
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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The symptoms you're describing are really weird, and it looks as though Perl might be misinstalled somehow.
Please, as the next step, do this at the shell prompt, and post the complete output verbatim:
Code:
which perl
perl -v
Thing two, in answer to your previous question:
Quote:
What now? Might there be some missing perl modules (in particular the printing module)? What perl files constitute a complete installation, i.e. could you post the perl directory from your machine?
Perl and its supporting files are in various places: man pages, for example, and (yes) modules. But the Perl executable itself is just one file. You don't need any extra modules (which are just Perl code) to do anything we have discusses in this thread.
Thing three: Um, I hesitate to mention this, but if uuencode was not properly installed on your system (quite an unusual situation, I think), then is there any chance that Perl is misinstalled? I suspect it would be easier to reinstall Perl than to try to figure out which pieces are missing. (And where the pieces are can vary from one Linux distribution to another, I suspect.
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Original Poster
Rep:
Uargh. I followed your directions as requested and forgot to bring the floppy along on which I stored the output. I'll do it from memory as best as I can:
Code:
which perl
/usr/sbin/perl
perl -v
perl5.8.7-linux-thread-multi {or something of this ilk}
<edit> Could that mean that the perl5.8.7 interpreter "has gone sour" or is buggy? Anything known alog these lines? </edit> <edit2> What's that line doing here? Some other text snippet got deleted as well...<edit2>
Quote:
Originally Posted by wjevans_7d1@yahoo.co
Three things.
Thing one:
The symptoms you're describing are really weird, and it looks as though Perl might be misinstalled somehow.
...
Um, I hesitate to mention this, but if uuencode was not properly installed on your system (quite an unusual situation, I think), then is there any chance that Perl is misinstalled? ...
No reason to hesitate . I removed and re-installed perl, to no avail.
But here it comes: I noticed in Konqueror, that the three perl scripts (your examples, posted above!) were presented as type "simple text" "unknown" and "perl script". Thus I tried to find out what caused this behaviour.
I also noticed that whereas the preview of the perl script file in Kate showed a color scheme the others didn't.
I opened them with Kate (and to make a long story short) I changed the encoding scheme from utf8 to iso8859-15. Then I noticed a few funny characters before the leading "#!/usr/sbin/perl" which I deleted (the funny characters ).
After that I had three files of the type "perls script" ... but I got new errors which I'll post the day after tomorrow (I'll be gone for 1 1/2 days).
They are in the lines of the error I posted above, something like "print("Hello,: bad interpreter: file or directory not found" for all the scripts.
<edit> Could that mean that the perl-5.8.7 interpreter "has gone sour" on me or is it known to be buggy? </edit>
Last edited by JZL240I-U; 08-24-2007 at 03:22 AM.
Reason: Questions at the end added.
I don't think that the Perl interpreter has gone sour on you. I suspect it's garbage characters at the beginning of the scripts. (Unlike my wife, I don't use any software whose name begins with the letter k.)
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Original Poster
Rep:
Quote:
Originally Posted by wjevans_7d1@yahoo.co
... I suspect it's garbage characters at the beginning of the scripts.
But, as you'll have noted, I deleted those and the scripts are recognized as perl scripts. What more can I do to make sure nothing is left, any suggestions?
Quote:
Originally Posted by wjevans_7d1@yahoo.co
...(Unlike my wife, I don't use any software whose name begins with the letter k.)
Ah, but I got the first hints of a (possible) solution from that k-software. Honestly, KDE is that much better than Win...
As to the details, here is the promised output from the two commands and the three scripts:
Code:
linux:~ #
linux:~ # which perl
/usr/bin/perl
linux:~ # perl -v
This is perl, v5.8.7 built for i586-linux-thread-multi
linux:~ # /home/me/perl-test
print("Hello,: bad interpreter: No such file or directory
linux:~ # /home/me/perl-pw-gen
: bad interpreter: No such file or directoryerl {<== even here the text is broken}
linux:~ # /home/me/perl-pwd
$a=`dd: bad interpreter: No such file or directory
linux:~ #
Note that in all three cases the error messages is mangled, in the second attempt even at the end of the message...
Um, look carefully at that hex stuff. Line endings appear thus:
Code:
<CR> 0d Macintosh
<LF> 0a *nix
<CR><LF> 0d 0a Microsoft(spit)
The *nix environment is often forgiving of <CR><LF>, but not of just <CR>. /home/me/perl-pw-gen has <CR><LF> at the end of the first line which is ok. But each of the other two files has <CR> only. This is a Bad Thing(tm).
You are right. Funny enough, the script does not run, so perl is not enough "forgiving" .
It isn't Perl's fault. When you're in the bash shell and you run something which begins with
Code:
#!
then bash interprets the rest of the line to determine what program to call. It tripped up on those two files because "the rest of the line" extends until the first 0x0A character. It isn't bash's job to figure out what the script really "meant"; it's bash's job to tell you that it couldn't find the right interpreter for the script.
Which is exactly what it did.
Quote:
Solution: Do never ever use µsoft software to copy any files from the net to Linux (*nix)
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Original Poster
Rep:
Quote:
Originally Posted by wjevans_7d1@yahoo.co
... It isn't bash's job to figure out what the script really "meant"; it's bash's job to tell you that it couldn't find the right interpreter for the script.
Which is exactly what it did.
Well, yes. On the other hand with pure bash scripts I had had no problems up until now, when I tried calling perl. But I don't mean to dispute your diagnosis.
Quote:
Originally Posted by wjevans_7d1@yahoo.co
Partially true.
Well, there is that. But you'll understand that I was recently traumatized .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.