[root@hunt1574 ~]# uname -a
Linux huntdb.com 2.6.39-300.26.1.el5uek #1 SMP Thu Jan 3 18:31:38 PST 2013 x86_64 x86_64 x86_64 GNU/Linux
[root@hunt1574 ~]# cat adduser.sh
#!/bin/bash
read -p "Input your want to add user name: " user
adduser $user
echo $user |passwd --stdin $user
echo "User $user is add,password is $user!"
[root@hunt1574 ~]# sh adduser.sh
Input your want to add user name: aaa
Changing password for user aaa.
passwd: all authentication tokens updated successfully.
User aaa is add,password is aaa!
执行过程应该对已存在user进行判断做出相应的动作。
以上为百科题库网整理的关于"用户键入正确的用户名和口令后,哪个脚本将会执行?"试题答案及解析,如想学习更多信息技术/IT类竞赛题,欢迎访问www.baiketk.com查看搜索更多相关信息。
转载请注明:百科题库网https://www.baiketk.com/q_u5f03ef5b4737a.html
相关题目推荐