02-08-2013
So, what are you asking for? Is this meant to generate a random password perhaps?
Using "pwd" is rather confusing as that is usually interpreted as "Present Working Directory"
Can you clarify?
Thanks
Robin
---------- Post updated at 02:18 PM ---------- Previous update was at 02:18 PM ----------
So, what are you asking for? Is this meant to generate a random password perhaps?
Using "pwd" is rather confusing as that is usually interpreted as "Present Working Directory"
Can you clarify?
Thanks
Robin
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Here is my script
#!/bin/bash
pwd
cd /var/lib/pgsql
Both "pwd" and "cd" are not executed is there any other way i can change the current working directory to /var/lib/pgsql pls help! (9 Replies)
Discussion started by: perk_bud
9 Replies
2. UNIX for Advanced & Expert Users
Can anyone explain this in detail ...
echo ${PWD#${PWD%/*/*}/}
Thanks in Advance (1 Reply)
Discussion started by: sakthi.abdullah
1 Replies
3. AIX
currently, my samba login works just fine. i want my clients to use aix5.3 account to login to samba so they don't have to change samba pwd and aix pwd. i googled, and vi /usr/lib/smb.conf per some of knowledge base, but i could not get to work.
aix5.3 and samba 3.0.24.0
thanks in advace..... (2 Replies)
Discussion started by: tjmannonline
2 Replies
4. Shell Programming and Scripting
The script to get the db user password from LDAP does not work on AIX 5.3. It's using bash. Our current shell is /usr/bin/shell.
How can i make changes to this script so that it can run on aix with current shell with out installing bash.
We tried making but din't work.
... (0 Replies)
Discussion started by: noorm
0 Replies
5. Shell Programming and Scripting
I have an export command which exports the file which I specify to the specified location. It asks for an pwd and again to confirm the pwd, can some one help me to pass the pwd thru the script.
cd /opt/var/SecureTransport/bin
xml_export /opt/SecureTransport/var/logs/accounts_log.xml... (3 Replies)
Discussion started by: srini0603
3 Replies
6. Shell Programming and Scripting
Hi there,
i was presented with a challenge that is beyond my current shell knowledge: how can you have a script that executed interactive will change your current working directory?
Example (under MacOS):
1. start Terminal and my current working directory is my home folder
2. execute a... (3 Replies)
Discussion started by: gigagigosu
3 Replies
7. Red Hat
Hi all,
Hereby wish to have your advise for below:
Main concept is
I intend to get current directory of my script file.
This script file will be copied to /etc/init.d.
A string in this copy will be replaced with current directory value.
Below is original script file:
... (6 Replies)
Discussion started by: cielle
6 Replies
8. Red Hat
Hi ppl hope to have your advice, i am run out of idea...
I have 3 scripts: a.sh, b.sh, and c.sh
a.sh resided in /etc/init.d
b.sh and c.sh /opt/xSystem
I intend to start my system with "service" command which will trigger my a.sh
service a.sh start
then.
a.sh will trigger... (4 Replies)
Discussion started by: cielle
4 Replies
9. Shell Programming and Scripting
how can i get the absolute path of whatever directory a script and/or command is in when it is run?
i want to know the directory. say for instance, if i were to run the "who" command, i want to know exaclty where the who command is located.
if a user ran a script, i want to know where there... (2 Replies)
Discussion started by: SkySmart
2 Replies
10. Shell Programming and Scripting
Hello,
I have the following script that just archives and clears some log files.
#!/bin/bash
# script: archive_logs_and_clear
# add date to logfile names and copy archive directory
# clear logs
# change to script directory
cd ... (4 Replies)
Discussion started by: LMHmedchem
4 Replies
LEARN ABOUT DEBIAN
string::mkpasswd
String::MkPasswd(3pm) User Contributed Perl Documentation String::MkPasswd(3pm)
NAME
String::MkPasswd - random password generator
SYNOPSIS
use String::MkPasswd qw(mkpasswd);
print mkpasswd();
# for the masochisticly paranoid...
print mkpasswd(
-length => 27,
-minnum => 5,
-minlower => 1, # minlower is increased if necessary
-minupper => 5,
-minspecial => 5,
-distribute => 1,
);
ABSTRACT
This Perl library defines a single function, "mkpasswd()", to generate random passwords. The function is meant to be a simple way for
developers and system administrators to easily generate a relatively secure password.
DESCRIPTION
The exportable "mkpasswd()" function returns a single scalar: a random password. By default, this password is nine characters long with a
random distribution of four lower-case characters, two upper-case characters, two digits, and one non-alphanumeric character. These
parameters can be tuned by the user, as described in the "ARGUMENTS" section.
ARGUMENTS
The "mkpasswd()" function takes an optional hash of arguments.
-length
The total length of the password. The default is 9.
-minnum
The minimum number of digits that will appear in the final password. The default is 2.
-minlower
The minimum number of lower-case characters that will appear in the final password. The default is 2.
-minupper
The minimum number of upper-case characters that will appear in the final password. The default is 2.
-minspecial
The minimum number of non-alphanumeric characters that will appear in the final password. The default is 1.
-distribute
If set to a true value, password characters will be distributed between the left- and right-hand sides of the keyboard. This makes it
more difficult for an onlooker to see the password as it is typed. The default is false.
-fatal
If set to a true value, "mkpasswd()" will Carp::croak() rather than return "undef" on error. The default is false.
If -minnum, -minlower, -minupper, and -minspecial do not add up to -length, -minlower will be increased to compensate. However, if
-minnum, -minlower, -minupper, and -minspecial add up to more than -length, then "mkpasswd()" will return "undef". See the section
entitled "EXCEPTION HANDLING" for how to change this behavior.
EXCEPTION HANDLING
By default, "mkpasswd()" will return "undef" if it cannot generate a password. Some people are inclined to exception handling, so
String::MkPasswd does its best to accommodate them. If the variable $String::MkPasswd::FATAL is set to a true value, "mkpasswd()" will
Carp::croak() with an error instead of returning "undef".
EXPORT
None by default. The "mkpasswd()" method is exportable.
SEE ALSO
<http://expect.nist.gov/#examples>, mkpasswd(1)
AKNOWLEDGEMENTS
Don Libes of the National Institute of Standards and Technology, who wrote the Expect example, mkpasswd(1).
AUTHOR
Chris Grau <cgrau@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2003-2010 by Chris Grau
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.1 or,
at your option, any later version of Perl 5 you may have available.
perl v5.10.1 2010-10-18 String::MkPasswd(3pm)