欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

self service 更改修改 更新 l-ict 密码是 7 的脚本 有大用 有大大用

做的脚本

#!/bin/bash

#

sudo /usr/bin/dscl . -passwd /Users/l-ict "aaaa" "xxxxx" > /dev/null 2>&1;

sudo /usr/bin/dscl . -passwd /Users/l-ict "aaaa1" "xxxxx" > /dev/null 2>&1;

sudo /usr/bin/dscl . -passwd /Users/l-ict "aaaa2" "xxxxx"  > /dev/null 2>&1;

sudo /usr/bin/dscl . -passwd /Users/l-ict "aaaa3" "xxxxx"  > /dev/null 2>&1;

echo "OK";



别人做的脚本

sysadminctl -adminUser l-ict -adminPassword "aaaa" -resetPasswordFor l-ict -newPassword "jxzz@dontlose";

sysadminctl -adminUser l-ict -adminPassword "aaaa1" -resetPasswordFor l-ict -newPassword "jxzz@dontlose";

sysadminctl -adminUser l-ict -adminPassword "aaaa2" -resetPasswordFor l-ict -newPassword "jxzz@dontlose"; 


sysadminctl -adminUser l-ict -adminPassword "aaaa1" -resetPasswordFor l-ict -newPassword "xxxxx";

sysadminctl -adminUser l-ict -adminPassword "aaaa2" -resetPasswordFor l-ict -newPassword "xxxxx"; 

sysadminctl -adminUser l-ict -adminPassword “aaaa3” -resetPasswordFor l-ict -newPassword "xxxxx"


普通分类: