ubuntu passwd批量修改密码

avatar
作者
筋斗云
阅读量: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.

广告一刻

为您即时展示最新活动产品广告消息,让您随时掌握产品活动新动态!