Hướng dẫn dùng whoami exe trong PHP
Skip to main content Show This browser is no longer supported. Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support. whoami
In this articleDisplays user, group and privileges information for the user who is currently logged on to the local system. If used without parameters, whoami displays the current domain and user name. Syntax
Parameters
ExamplesTo display the domain and user name of the person who is currently logged on to this computer, type:
Output similar to the following appears:
To display all of the information in the current access token, type:
Additional References
FeedbackSubmit and view feedback for Skip to main content Nội dung chính
This browser is no longer supported. Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support. whoami
In this articleDisplays user, group and privileges information for the user who is currently logged on to the local system. If used without parameters, whoami displays the current domain and user name. Syntax
Parameters
ExamplesTo display the domain and user name of the person who is currently logged on to this computer, type:
Output similar to the following appears:
To display all of the information in the current access token, type:
Additional References
FeedbackSubmit and view feedback for Tìm hiểu khi sử dụng các hàm băm tạo dữ liệu lưu trữ passwordKhi lưu trữ password vào CSDL thường sẽ sử dụng các hàm băm khác nhau được hỗ trợ bởi hệ CSDL hoặc ngôn ngữ lập trình (như MD5, SHA1 ...) để tạo dữ liệu mã hóa, dữ liệu mã hóa đó được lưu vào CSDL. Ví dụ: $raw_password = 'abc123'; $crypt = md5($raw_password); //e99a18c428cb38d5f260853678922e03 Ví dụ trên, đã sử dụng hàm băm của PHP là Bởi vì hàm băm tạo ra các giá trị
không thể dịch ngược (không có thuật toán để giải giá trị hash Sử dụng Salt tăng cường an toàn cho mật khẩuĐể phức tạp
hóa mật khẩu lưu trữ, thì các mật khẩu gốc trước khi mã hóa được nối thêm các chuỗi, các chuỗi thêm này gọi là Ví dụ: $raw_password = 'abc123'; //Sinh ra chuỗi dài 32 ngẫu nhiên, cũng cần lưu chuỗi này vào một cột trong DB $salt = random_bytes(32); //Sử dụng thêm một salt cố định $staticSalt = 'G4334#'; $crypt = md5($staticSalt.$raw_password.$salt); Giờ mật khẩu lưu trữ ở trên phức tạp hơn rất nhiều. Biết được Phiên bản ngắn của câu hỏi: Sự khác biệt giữa Phiên bản dài của câu hỏi:
Và tôi gặp lỗi này:
Vì vậy, tôi đã thực hiện một số thao tác và có vẻ như để khắc phục điều này, tôi cần thay đổi Tuy nhiên, câu hỏi của tôi là về một thứ khác. Trong quá trình này, tôi nhận ra rằng tôi không hiểu rõ ràng khái niệm về
Vì thế...
Chỉnh sửa: Tôi đã cập nhật điều này để phản ánh rằng đó không phải là thư mụcxyz mà tôi phải thay đổi cài đặt CHMOD. Tôi đã phải thay đổi cài đặt cho tệp PDOErrors.txt Mở ở đây: để tham khảo trong tương lai, tôi đưa ra một câu hỏi song song cho nền tảng Linux tại đây (kèm theo lời giải thích trực quan về những gì đang xảy ra): https://stackoverflow.com/questions/31389892/why-is-the-output- www-data-in-one-case-and-root-in-another 17 hữu ích 1 bình luận 18k xem chia sẻ |