In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
There are many ways for linux to generate random passwords, two of which are introduced here, one is the internal system variable ($RANDOM), and the other is to use openssl.
The internal system variable ($RANDOM) can directly echo to get a set of random numbers:
# echo $RANDOM30468
Get an 8-digit random number:
# echo $RANDOM | md5sum | cut-c 1-8393c839b
Use the openssl command to get a random number:
# openssl rand-base64 8qpIpWLYS6Yk =
Get an 8-digit random number:
# openssl rand-base64 8 | cut-c 1-8GPHYu+MU
Create 10 system users in batch and set the random number password script to:
# cat useradd.sh #! / bin/bashfor I in `seq-w 10` do pass= `echo $RANDOM | md5sum | cut-c 1-8` # when using random numbers as passwords, be sure to define variables, otherwise the generated password and the last recorded password are not uniform useradd user$i & & echo $password | passwd-stdin user$i echo-e "user:user$i\ t pass:$pass" > > / tmp/user.logdone
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.