Sponsored Content
Top Forums UNIX for Dummies Questions & Answers A shell script or software for generating random passwords Post 302405577 by amitranjansahu on Friday 19th of March 2010 07:25:47 AM
Old 03-19-2010
now you already have the script for passwd generation on random.

Now using expect u can change the current passwd with ur random passwd .

And for setting the expiration of passwd please check the man pages of "chage".

Try to proceed with this info . Let us know if you face any issue.

KR
Amit
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Generating random numbers

Hi, I am having trouble with generating random numbers. can this be done with awk? So I have a file that looks like this: 23 30 24 40 26 34 So column1 is start and column2 is end. I want to generate 3 random #'s between start and stop: So the output will look like this: ... (9 Replies)
Discussion started by: phil_heath
9 Replies

2. Programming

generating 16 digit random number in C

Hi, How can we generate 16 digit random nos in C. (10 Replies)
Discussion started by: ajaysahoo
10 Replies

3. Programming

C Help; generating a random number.

Im new to C, and Im having a hard time getting a random number. In bash, I would do something similar to the following to get a random number; #!/bin/bash seed1=$RANDOM seed2=$RANDOM seed3=$RANDOM SEED=`expr $seed1 * $seed2 / $seed3` echo ${SEED%.*} Now, in online examples... (4 Replies)
Discussion started by: trey85stang
4 Replies

4. Windows & DOS: Issues & Discussions

A software or a batch file to genarate random passwords

Hi, Is there a batch file or any software to genarate random passwords and the passwords expire automatically after a stipulated time period. Please suggest. (1 Reply)
Discussion started by: dwiravi
1 Replies

5. UNIX for Dummies Questions & Answers

A shell script or any software to genarate random passwords

Hi, Is there a shell script or any software to genarate random passwords and the passwords expire automatically after a stipulated time period. Please suggest. (2 Replies)
Discussion started by: dwiravi
2 Replies

6. Shell Programming and Scripting

Generating Random Number in certain range

Hi there I am trying to generate a random number between 40 and 70 using the shell here is my code so far and it keeps going above 70. all help much appreciated! comp=$(( RANDOM%70+40 )) echo $comp (4 Replies)
Discussion started by: faintingquiche
4 Replies

7. Shell Programming and Scripting

Random Passwords

Hi Friends, I need a quick help in unix scripts, my aim is to generate random passwords like, 1. first 3 characters are alphabets or numbers 2. then one of special characters like &()/?:;+- 3. Last 4 characters are alphabets or numbers total length will be 8. i tried with... (1 Reply)
Discussion started by: Nandy
1 Replies

8. Shell Programming and Scripting

Random number generating script?

Having a hard time with this. Very new to scripting and linux. Spent all sunday trying to do this. Appreciate some help and maybe help breaking down what the syntax does. Create a Bash program. It should have the following properties • Creates a secret number between 1 and 100 i. The... (3 Replies)
Discussion started by: LINUXnoob15
3 Replies

9. Shell Programming and Scripting

Generating a Random String of 'n' length

Hi, How can I generate a string of random characters (alpha+numeric) of a particular length ? For e.g. for n=5, output = 'kasjf' n=10, output = 'hedbcd902k' Also, please let me know if random (valid) dates could also be generated. Thanks (7 Replies)
Discussion started by: rishigc
7 Replies

10. Shell Programming and Scripting

Generating a POSIX random number?

Hi Guys and gals... As you know I am getting to grips with POSIX and hit this stumbling block. Generating two random numbers 0 to 255 POSIXly. Speed in not important hence the 'sleep 1' command. I have done a demo that works, but it sure is ugly! Is there a better way? #!/bin/sh # Random... (12 Replies)
Discussion started by: wisecracker
12 Replies
OTPW-GEN(1)						      General Commands Manual						       OTPW-GEN(1)

NAME
otpw-gen - one-time password generator SYNOPSIS
otpw-gen [ options ] DESCRIPTION
OTPW is a one-time password authentication system. It can be plugged into any application that needs to authenticate users interactively. One-time password authentication is a valuable protection against password eavesdropping, especially for logins from untrusted terminals. Before you can use OTPW to log into your system, two preparation steps are necessary. Firstly, your system administrator has to enable it. (This is usually done by configuring your login software (e.g., sshd) to use OTPW via the Pluggable Authentication Module (PAM) configura- tion files in /etc/pam.d/.) Secondly, you need to generate a list of one-time passwords and print it out. This can be done by calling otpw-gen | lpr or something like otpw-gen -h 70 -s 2 | a2ps -1B -L 70 --borders no if more control over the layout is desired. You will be asked for a prefix password, which you need to memorize. It has to be entered immediately before the one-time password. The prefix password reduces the risk that anyone who finds or steals your password printout can use that alone to impersonate you. Each one-time password will be printed behind a three digit password number. Such a number will appear in the password prompt when OTPW has been activated: Password 026: When you see this prompt, enter the memorized prefix password, followed immediately by the one-time password identified by the number. Any spaces within a password have only been inserted to improve legibility and do not have to be copied. OTPW will ignore the difference between the easily confused characters 0O and Il1 in passwords. In some situations, for example if multiple logins occur simultaneously for the same user, OTPW defends itself against the possibility of various attacks by asking for three random passwords simultaneously. Password 047/192/210: You then have to enter the prefix password, followed immediately by the three requested one-time passwords. This fall-back mode is acti- vated by the existence of the lock file ~/.otpw.lock. If it was left over by some malfunction, it can safely be deleted manually. Call otpw-gen again when you have used up about half of the printed one-time passwords or when you have lost your password sheet. This will disable all remaining passwords on the previous sheet. OPTIONS
-h number Specify the total number of lines per page to be sent to standard output. This number minus four header lines determines the number of rows of passwords on each page. The maximum number of passwords that can be printed is 1000. (Minimum: 5, default: 60) -w number Specify the maximum width of lines to be sent to standard output. This parameter determines together with the password length the number of columns in the printed password matrix. (Minimum: 64, default: 79) -s number Specify the number of form-feed separated pages to be sent to standard output. (Default: 1) -e number Specify the minimum entropy of each one-time password in bits. The length of each password will be chosen automatically, such that there are at least two to the power of the specified number possible passwords. A value below 30 might make the pass- words vulnerable to a brute-force guessing attack. If the attacke might have read access to the ~/.otpw file, the value should be at least 48. Paranoid users might prefer long high-security passwords with at least 60 bits of entropy. (Default: 48) -p0 Generate passwords by transforming a random bit string into a sequence of letters and digits, using a form of base-64 encod- ing (6 bits per character). (Default) -p1 Generate passwords by transforming a random bit string into a sequence of English four-letter words, each chosen from a fixed list of 2048 words (2.75 bits per character). -f filename Specify a file to be used instead of ~/.otpw for storing the hash values of the generated one-time passwords. AUTHOR
The OTPW package, which includes the otpw-gen progam, has been developed by Markus Kuhn. The most recent version is available from <http://www.cl.cam.ac.uk/~mgk25/otpw.html>. SEE ALSO
pam(8), pam_otpw(8) 2003-09-30 OTPW-GEN(1)
All times are GMT -4. The time now is 09:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy