Sau khi bạn đã xác định được mục khởi động thích hợp như đã chỉ định ở bước trước, hãy sử dụng các mũi tên điều hướng để tìm từ khóa
Enter new UNIX password: Retype new UNIX password: passwd: Authentication token manipulation error passwd: password unchanged3 và thay thế nó bằng từ khóa
Enter new UNIX password: Retype new UNIX password: passwd: Authentication token manipulation error passwd: password unchanged4. Tiếp theo, trên cùng một mục khởi động, hãy tìm từ khóa
Enter new UNIX password: Retype new UNIX password: passwd: Authentication token manipulation error passwd: password unchanged5 và thay thế bằng
Enter new UNIX password: Retype new UNIX password: passwd: Authentication token manipulation error passwd: password unchanged6
Enter new UNIX password: Retype new UNIX password: passwd: Authentication token manipulation error passwd: password unchanged7 và tìm phân vùng gắn kết gốc
Enter new UNIX password: Retype new UNIX password: passwd: Authentication token manipulation error passwd: password unchanged8. Xác nhận rằng phân vùng này được gắn với quyền
Enter new UNIX password: Retype new UNIX password: passwd: Authentication token manipulation error passwd: password unchanged4.
# mount -o remount,rw /0 và nhập mật khẩu mới của bạn. Nhập lại mật khẩu gốc để xác minh. Nhấn
# mount -o remount,rw /1 và xác nhận rằng đặt lại mật khẩu thành công.
Ở giai đoạn này, bạn đã hoàn tất. Chỉ cần khởi động lại hệ thống của bạn hoặc tiếp tục khởi động bằng lệnh linux sau.
root@[none]:/# exec /sbin/init
Đặt lại Khắc phục sự cố mật khẩu Kali Linux
Enter new UNIX password: Retype new UNIX password: passwd: Authentication token manipulation error passwd: password unchanged
Phân vùng gốc của bạn được gắn ở chế độ chỉ đọc. Cố gắng
# mount -o remount,rw /
để giải quyết vấn đề này
Enter new UNIX password: Retype new UNIX password: passwd: Authentication token manipulation error passwd: password unchanged2
Đảm bảo rằng bạn đã xóa tùy chọn khởi động
# mount -o remount,rw /2 khi chỉnh sửa mục menu của grub
Khi cố gắng khởi động lại bằng lệnh
# mount -o remount,rw /3, tôi nhận được
Enter new UNIX password: Retype new UNIX password: passwd: Authentication token manipulation error passwd: password unchanged5
Bỏ qua và khởi động lại với
Enter new UNIX password: Retype new UNIX password: passwd: Authentication token manipulation error passwd: password unchanged6
Bớt tư tưởng
Trong hướng dẫn này, chúng ta đã thấy cách đặt lại mật khẩu Kali Linux cho tài khoản người dùng root. Đối với những người dùng quên mật khẩu Kali Linux, không cần phải lo lắng, vì quy trình này luôn có thể được sử dụng để đăng nhập lại và đặt lại mật khẩu của bạn. Trong các phiên bản mới nhất của Kali Linux, tài khoản root hoàn toàn không có mật khẩu và người dùng phải thực thi các lệnh với quyền quản trị viên thông qua việc sử dụng tiện ích
Enter new UNIX password: Retype new UNIX password: passwd: Authentication token manipulation error passwd: password unchanged4
Tùy thuộc vào phiên bản máy chủ MySQL hoặc MariaDB mà bạn đang chạy trên hệ thống của mình, bạn sẽ cần sử dụng các lệnh khác nhau để khôi phục mật khẩu gốc
Bạn có thể tìm thấy phiên bản máy chủ của mình bằng cách ban hành lệnh sau
Enter new UNIX password: Retype new UNIX password: passwd: Authentication token manipulation error passwd: password unchanged7
Nếu bạn đã cài đặt MySQL trong hệ thống của mình, đầu ra sẽ giống như thế này
Enter new UNIX password: Retype new UNIX password: passwd: Authentication token manipulation error passwd: password unchanged8
Hoặc xuất như thế này cho MariaDB
Enter new UNIX password: Retype new UNIX password: passwd: Authentication token manipulation error passwd: password unchanged9
Đảm bảo ghi lại phiên bản MySQL hoặc MariaDB mà bạn đang chạy
Cách đặt lại mật khẩu gốc của MySQL hoặc MariaDB #
Thực hiện theo các bước sau để đặt lại mật khẩu gốc MySQL/MariaDB của bạn
1. Dừng dịch vụ MySQL/MariaDB #
Để thay đổi mật khẩu gốc trước tiên, bạn cần dừng máy chủ MySQL. Để làm như vậy gõ lệnh sau
Enter new UNIX password: Retype new UNIX password: passwd: Authentication token manipulation error passwd: password unchanged0
2. Khởi động máy chủ MySQL/MariaDB mà không cần tải các bảng cấp phép #
Khởi động máy chủ cơ sở dữ liệu mà không tải các bảng cấp
Enter new UNIX password: Retype new UNIX password: passwd: Authentication token manipulation error passwd: password unchanged1
Dấu và
Enter new UNIX password: Retype new UNIX password: passwd: Authentication token manipulation error passwd: password unchanged84 ở cuối lệnh trên sẽ khiến chương trình chạy ẩn, vì vậy bạn có thể tiếp tục sử dụng trình bao
Khi tùy chọn
Enter new UNIX password: Retype new UNIX password: passwd: Authentication token manipulation error passwd: password unchanged85 được sử dụng, bất kỳ ai cũng có thể kết nối với máy chủ cơ sở dữ liệu mà không cần mật khẩu và với tất cả các đặc quyền được cấp
3. Đăng nhập vào vỏ MySQL #
Bây giờ bạn có thể kết nối với máy chủ cơ sở dữ liệu với tư cách là người dùng root
Enter new UNIX password: Retype new UNIX password: passwd: Authentication token manipulation error passwd: password unchanged4
4. Đặt mật khẩu gốc mới #
Chạy các lệnh sau nếu bạn chạy MySQL 5. 7. 6 trở lên hoặc MariaDB 10. 1. 20 trở về sau
Enter new UNIX password: Retype new UNIX password: passwd: Authentication token manipulation error passwd: password unchanged
5Nếu câu lệnh
Enter new UNIX password: Retype new UNIX password: passwd: Authentication token manipulation error passwd: password unchanged
86 không phù hợp với bạn, hãy thử sửa đổi trực tiếp bảng người dùngEnter new UNIX password: Retype new UNIX password: passwd: Authentication token manipulation error passwd: password unchanged
7Chạy các lệnh sau nếu bạn có MySQL 5. 7. 5 trở về trước hoặc MariaDB 10. 1. 20 trở về trước
Enter new UNIX password: Retype new UNIX password: passwd: Authentication token manipulation error passwd: password unchanged
8
Trong cả hai trường hợp nếu mọi việc suôn sẻ, bạn sẽ thấy đầu ra sau
Enter new UNIX password: Retype new UNIX password: passwd: Authentication token manipulation error passwd: password unchanged9
5. Dừng và Khởi động máy chủ cơ sở dữ liệu bình thường #
Bây giờ mật khẩu gốc đã được đặt, dừng máy chủ cơ sở dữ liệu và khởi động bình thường
Enter new UNIX password: Retype new UNIX password: passwd: Authentication token manipulation error passwd: password unchanged80
Bạn sẽ được nhắc nhập mật khẩu gốc mới
Khởi động máy chủ cơ sở dữ liệu bình thường
Đối với MySQL, gõ
Enter new UNIX password: Retype new UNIX password: passwd: Authentication token manipulation error passwd: password unchanged
81Đối với MariaDB, hãy nhập
Enter new UNIX password: Retype new UNIX password: passwd: Authentication token manipulation error passwd: password unchanged
82
6. Xác minh mật khẩu #
Để xác minh rằng mật khẩu gốc mới đã được áp dụng chính xác, hãy nhập
Enter new UNIX password: Retype new UNIX password: passwd: Authentication token manipulation error passwd: password unchanged83
Bạn sẽ được nhắc nhập mật khẩu gốc mới. Nhập nó và bạn sẽ đăng nhập vào máy chủ cơ sở dữ liệu của mình
Phần kết luận #
Chúng tôi đã chỉ cho bạn cách đặt lại mật khẩu gốc MySQL/MariaDB của bạn. Đảm bảo mật khẩu gốc mới của bạn mạnh và an toàn và giữ mật khẩu ở nơi an toàn