Visit Our UNIX and Linux User Community

expect script for random password and random commands

Thread Tools Search this Thread
Operating Systems Linux Ubuntu expect script for random password and random commands
# 1  
Old 03-18-2011
expect script for random password and random commands


I am new to expect. Please if any one can help on my issue its really appreciable. here is my issue:

I want expect script for random passwords and random commands generation.

please can anyone help me?

Many Thanks in advance

Previous Thread | Next Thread
Test Your Knowledge in Computers #371
Difficulty: Medium
PHP opcodes are generated each time the program is launched and are always interpreted and not just-in-time compiled.
True or False?

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Expect script not passing password / commands ??

Newbie here. My goal is to have the expect script log into the Ubuntu 18.04 server and run two commands (lsb_release -a and ip addr) and eventually pipe the output/results to a file. For now, I would be happy to get this one command or two to run successfully. How to fix this? #!/usr/bin/expect ... (3 Replies)
Discussion started by: jacob600
3 Replies

2. Shell Programming and Scripting

Random Password generator with 2 digits and 6 characters

I am using the below to random generate a password but I need to have 2 numeric characters and 6 alphabetic chars head /dev/urandom | tr -dc A-Za-z0-9 | head -c 8 ; echo '' 6USUvqRB ------ Post updated at 04:43 PM ------ Any Help folks - Can the output be passed onto a sed command to... (9 Replies)
Discussion started by: infernalhell
9 Replies

3. AIX

Random password generation

Hello, I have created a script to generate a random password on Linux/Solaris, but I simply cannot use it on my AIX VMs since Bash isn't installed on them. I need a password that is randomly created with the following... (12 Replies)
Discussion started by: gfroute
12 Replies

4. Shell Programming and Scripting

Need to generate a file with random data. /dev/[u]random doesn't exist.

Need to use dd to generate a large file from a sample file of random data. This is because I don't have /dev/urandom. I create a named pipe then: dd if=mynamed.fifo do=myfile.fifo bs=1024 count=1024 but when I cat a file to the fifo that's 1024 random bytes: cat randomfile.txt >... (7 Replies)
Discussion started by: Devyn
7 Replies

5. Ubuntu

Random insertion of letters to password

Hi,, Here i have attached a text file where iam facing problem in my code. Please read the file and help me out of this issue.. Thanks in advance (4 Replies)
Discussion started by: vanid
4 Replies

6. Programming

Generate Random Password in C

I need a function to generate a random alphanumeric password in C code. It needs to be between 6-8 characters and follow the following rules: Reject if same char appears # time: 4 or more Reject if same char appears consecutively: 3 or more I have the following random password working for... (2 Replies)
Discussion started by: vjaws
2 Replies

7. Shell Programming and Scripting

Generate a random password

Hello All... Can someone help me generate a random password which will be 7 characters long which contains alpha-numeric characters using shell script. I am looking to store the output of the script that generates the password to a variable within a script and use it as the password. ... (5 Replies)
Discussion started by: chiru_h
5 Replies
rand(3UCB)					     SunOS/BSD Compatibility Library Functions						rand(3UCB)

rand, srand - simple random number generator SYNOPSIS
/usr/ucb/cc[ flag ... ] file ... int rand() int srand( seed); unsigned seed; DESCRIPTION
rand() uses a multiplicative congruential random number generator with period 2**32 to return successive pseudo-random numbers in the range from 0 to "2**31 -1." srand() can be called at any time to reset the random-number generator to a random starting point. The generator is initially seeded with a value of 1. SEE ALSO
drand48(3C), rand(3C), random(3C) NOTES
Use of these interfaces should be restricted to only applications written on BSD platforms. Use of these interfaces with any of the system libraries or in multi-thread applications is unsupported. The spectral properties of rand() leave a great deal to be desired. drand48(3C) and random(3C) provide much better, though more elaborate, random-number generators. The low bits of the numbers generated are not very random; use the middle bits. In particular the lowest bit alternates between 0 and 1. SunOS 5.10 12 Feb 1993 rand(3UCB)

Featured Tech Videos