Bash for multiple accounts with auto-gen passwords
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
conventions. So, I would like to have a separate file(Example:
usernames.txt) where I can paste the user ids, Name for Each ID, Group Name
or GID, Serial Number) and call that file in the script
2. The script should contain the block of code that will auto-generate
random 8-character long alphanumeric and mixed-case passwords without
special characters or symbols(Something like
for each ID and these system-generated passwords should be saved in a different file after the script is run. (Example:
passwords.txt)
I googled but couldn't find a solid script for my above requirements.
Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.
Please review the rules, which you agreed to when you registered, if you have not already done so.
More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.
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.
#!/bin/bash
echo
echo
echo -ne "Password length:"
read pwd_length
echo
echo -ne "Number of... (6 Replies)
Hello Experts,
Need some direction on creating shell script for following environment:
We have about 20 people in the team working as Oracle DBA's (sysdba's and appdba's). Total Servers which is a mix of Unix and Linux are 200. We do not have Root user access on any of the servers and... (3 Replies)
Hi,
this question is not specially unix related, but I expect advanced and expert unix users to have a solution for this, and I've found no other subforum that fits ;)
what do you use to store accounts, customer ids, ip addresses, users and specially passwords, to access them from... (6 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)
hello ppl, someone must be able to help with this --> I have an old NCR tower 32 with an ADDS terminal running a unix version 020102 (Im not sure if thats correct but its unix for sure). I have no user names and no passwords and need to login to read a tape. Is there any way to do that? I hear... (3 Replies)
General Question: If a script calls multiple external programs (external to the script, but still on unix), where do the return codes go? Let's say one of external programs fails, does the entire script fail and send a non-zero return code to the job scheduling software, or is the return code sent... (1 Reply)
I'm finding the following command very tedious to type in all the time, so I created a one line bash script called mount.bash with the following contents:
mount -t cifs //mark/C\$ -o unc=//mark\\C$,ip=10.1.1.33,user=Administrator,password=$1 /mnt/mark
I don't like the fact that I have to put... (5 Replies)
Hi,
I am trying to setup account locking in Solaris 9.
I have made the changes in /etc/default/login where
RETRIES=5 and
SYSLOG_FAILED_LOGINS=5
and in /etc/user_attr I am having:
test_user::::lock_after_retries=yes
Still I am not able to lock test_user after successive
unsuccessful... (1 Reply)