Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

A gadget for generating user names and random passwords in batches

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Have nothing to do, write a gadget for friends to generate user names and random passwords in batches

#! / bin/bashif [- z "$1"] thenecho "Usage:. / genpasswd [- u userid] [- n user numbers] [- f password file]" exit 1fi# get optionswhile getopts "u:n:f:" argdocase $arg inu) USER=$OPTARG;;n) NUMS=$OPTARG;;f) FILE=$OPTARG;;?) echo "Usage:. / genpasswd [- u userid] [- n numbers] [- f file]" exit 1 Esacdone# debug#echo $USER#echo $NUMS#echo $FILE# generate passwordwhile [$NUMS-gt 0] doUSER= `expr $USER + 1`NUMS = `expr $NUMS-1`PASSWD = `mkpasswd.pl-C 0-s 0`echo "$USER:$PASSWD" > > $FILEdone

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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report