Hey guys, I'm trying to make a bash script to do password generation.
The script takes 2 arguments, number of characters and number of passes to generate, but I can't get the loop to work properly.
Hi,
I use AIX (ksh) and Linux (bash) servers. I'm trying to do scripts to will run in both ksh and bash, and most of the time it works. But this time I don't get it in bash (I'm more familar in ksh).
The goal of my script if to read a "config file" (like "ini" file), and make various report.... (2 Replies)
I'm trying to understand if it's possible to create a set of variables that are numbered based on another variable (using eval) in a loop, and then call on it before the loop ends.
As an example I've written a script called question (The fist command is to show what is the contents of the... (2 Replies)
Hello, here is my problem:
I have 20 machines that need to SSH into 1 machine throughout the day. The issue is every time I go through the process of putting my keys from one of the computers that needs to SSH to the server that needs to accept all the incoming SSH's it overrides the last one.
... (6 Replies)
Hi all
Sorry for the basic question, but i am writing a shell script to get around a slightly flaky binary that ships with one of our servers. This particular utility randomly generates the correct information and could work first time or may work on the 12th or 100th attempt etc !.... (4 Replies)
Hello all, I am i am trying to read username password. Bassicaly, i have file called sidlist and it has my database name, username and password....
looks something like this....
db1, user1, pass1
db2, user2, pass2
db3, user3, pass4
but i dont know how to make it work, until i get... (4 Replies)
hello all, i am trying to find a better to do what i am doing right now...
i have a file called sidlist...which has my database_name and password to the respective database
so something like below.. file is called sidlist and entry is below...
test, abc123
kes12, abcd12
pss, abcd1234... (5 Replies)
Hello,
I am studying few things on unux and scripting. I need a script to create bulk users in unux. I need some assistance from you for creating 100 or more User IDs using a bash script:
Here's my requirements:
1. I need to create 100 or even more user ids of different naming... (1 Reply)
I want to give my long scripts to customer. The customer must not be able to read the scripts even if he has the password. The following command locks and unlocks the script but the set +x is simply ignored.
The code:
read -p 'Script: ' S && C=$S.crypt H='eval "$((dd if=$0 bs=1 skip=//|gpg... (7 Replies)
I am super new to scripting and I am trying to create a bash script that is interactive that will change other user passwords as well as a few other thing (ie. change SMB pw, see pw expiration,lock/unlock user).
I have started it by making it check to see if the username entered is in the... (2 Replies)
Discussion started by: thumbelina
2 Replies
LEARN ABOUT PHP
rand
RAND(3) 1 RAND(3)rand - Generate a random integerSYNOPSIS
int rand (void )
DESCRIPTION
int rand (int $min, int $max)
If called without the optional $min, $max arguments rand(3) returns a pseudo-random integer between 0 and getrandmax(3). If you want a
random number between 5 and 15 (inclusive), for example, use rand(5, 15).
Caution
This function does not generate cryptographically secure values, and should not be used for cryptographic purposes. If you need a
cryptographically secure value, consider using random_int(3), random_bytes(3), or openssl_random_pseudo_bytes(3) instead.
Note
On some platforms (such as Windows), getrandmax(3) is only 32767. If you require a range larger than 32767, specifying $min and
$max will allow you to create a range larger than this, or consider using mt_rand(3) instead.
PARAMETERS
o $min
- The lowest value to return (default: 0)
o $max
- The highest value to return (default: getrandmax(3))
RETURN VALUES
A pseudo random value between $min (or 0) and $max (or getrandmax(3), inclusive).
EXAMPLES
Example #1
rand(3) example
<?php
echo rand() . "
";
echo rand() . "
";
echo rand(5, 15);
?>
The above example will output something similar to:
7771
22264
11
SEE ALSO srand(3), getrandmax(3), mt_rand(3), random_int(3), random_bytes(3), openssl_random_pseudo_bytes(3).
PHP Documentation Group RAND(3)