ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
1.1 批量创建用户并添加sudo权限 cat useradd.sh ~~~ #!/bin/bash username=wlwceph password=123456 if [ -n $username ] then groupadd $username -g 10036 useradd -m $username -g $username -u 10036 echo "$password" | passwd --stdin $username echo "user $username group $username is changed!" else echo "use $username is fail" fi ####add sudo power #### echo "$username ALL = (root) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/$username sudo chmod 0440 /etc/sudoers.d/$username ~~~