In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-18 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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.