热门关键字:  ubuntu  分区  函数  Fedora  linux系统进程

当前位置 :| 主页>Linux教程>Shell开发>

自动批处理修改用户密码

来源: 作者: 时间:2007-12-06 Tag: 点击:
#!/bin/bash
#脚本用法
if [$# == 1]
then
  echo "make sure $1 format is right"
  read -n 1
else
  echo "usage: ./thisshell namepasswd.lst "
  exit
fi
# 脚本必须由root用户执行
currentuser=`id -u`
if [$currentuser==1]
then
  echo "脚本必须由root用户执行"
  exit
fi
chpasswd < $1
最新评论共有 4 位网友发表了评论
发表评论
评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
用户名: 密码:
匿名?
注册