Linux自动批量添加用户 - graybull's Blog
Linux自动批量添加用户
shell script如下:
该script从文件usernames中读取用户名,然后创建用户,并设置密码为:用户名+suffix
#!/bin/bash suffix=123 for name in `awk '{print $0}' ./usernames` do # echo $name useradd -d /home/${name} -g develop -s /bin/bash ${name} # echo ${name}${suffix} echo ${name}${suffix} | passwd ${name} --stdin done
2018年12月18日 23:03
The information you share is great. I appreciate your sharing. Thank you very much
2019年7月09日 21:28
Thank you so much! I'm glad to find this post here, I learned a lot from it.
2020年4月09日 08:00
Nice post.
2020年6月24日 05:40
This code is informative. I found it lucky as I was stucked in a set of coding and this piece resolve my tensions. Thank you.
2022年10月03日 10:31
This is bit confusing yet informative code. I copied it for showing some example in my dissertation. Keep it up.
2022年10月03日 10:33
Great work folks.
2024年1月11日 22:59
JNANABHUMI AP offers the most recent information on education. The primary idea or goal of this website has been to offer comprehensive resources with information on any subject that can be accessed online. To make sure that every reader finds out what they should know about the subject they are interested in and jnanabhumiap.in links to our content.Jnanabhumi AP is a startup founded by enthusiastic bloggers and webmasters who are driven to produce interesting, factual, and well-written content. We are similar to an online community where you can find a variety of resources, information, and topics about newsworthy events or daily occurrences.