分类:
2008-05-11 22:20:27
或者直接用这个脚本:
[@more@]
#!/usr/bin/ksh
#author:
mkuser rlogin='false' root2
cd /home
chown root2 root2
cp /.profile /home/root2/.profile
ed /etc/passwd<g/^root2:/d
a
root2:!:0:0::/home/root2:/usr/bin/ksh
.
w
.
!
clear
echo
echo =========================================================
echo Please don\'t forget those steps as fellow.
echo 1.if you want to remove root2 after 2 days, please input:
echo echo rmuser root2 \|at now + 2 days
echo 2.set a passwd for root2:
echo passwd root2
echo 3.have a test for root2:
echo exit\; su \- root2
echo =========================================================
echo