温馨提示×

ubuntu passwd批量修改密码

小樊
109
2024-07-22 15:52:03
栏目: 智能运维
Ubuntu服务器限时活动,0元免费领,库存有限,领完即止! 点击查看>>

You can use the chpasswd command to change passwords for multiple users in Ubuntu. Here’s how you can do it:

  1. Create a file (e.g. userlist.txt) with the list of username:password pairs for the users whose passwords you want to change. Each line in the file should have the username and the new password separated by a colon, like this:
user1:newpassword1
user2:newpassword2
user3:newpassword3
  1. Run the following command in the terminal to change the passwords for the users listed in the file:
sudo chpasswd < userlist.txt

This will update the passwords for the specified users in bulk. Make sure to replace userlist.txt with the actual file name if it’s different.

亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>

推荐阅读:ubuntu passwd与chpasswd区别

0