38.8k views
3 votes
On an Ubuntu system, which of the following commands helps you view the current password policy for a user?

a) passwd

b) chage

c) pwck

d) usermod

1 Answer

7 votes

Final answer:

To view the current password policy for a user on an Ubuntu system, the correct command is 'chage -l username'. The 'chage' command provides details such as password expiry information for a user account.

Step-by-step explanation:

To view the current password policy for a user on an Ubuntu system, you should use the chage command. The chage command allows you to view and modify user password expiry information. Specifically, to view the password policy, you can use chage -l username, where 'username' is the name of the user whose password policy you want to check.

Here's an example:

  • Type chage -l username in the terminal.
  • Press Enter, and the password policy details for the user will be displayed, including the last password change, password expiry, and account expiry details.

The other commands mentioned have different functions:

  • passwd is used to update a user's password.
  • pwck checks the integrity of password files.
  • usermod modifies a user account.

User Christopher P
by
7.9k points