I can open the User sections by running gnome-control-center but I need to access directly the password dialog box. Is there a way to directly open it?
2 Answers
I am not aware of a way to directly open this dialog using a terminal command. You can, however, directly open the "Users" panel in Settings with the command
gnome-control-center user-accountsfrom where a single click opens the dialog.
4You can make your own GUI dialog in a bash script like so:
#!/bin/bash
while true do input=$(zenity --forms --title="Change Password" --text="Password for $USER" --separator="\n" --add-password="Old Password" --add-password="New Password" --add-password="Confirm New Password") [[ "$?" != "0" ]] && break echo -e "$input" | passwd && zenity --info --text="Password for $USER successfuly changed." --no-wrap && break || \ zenity --forms --title="Change Password Error" --text="Please Enter Valid Password for $USER" [[ "$?" != "0" ]] && break doneYou will need to install zenity if it is not already installed like so:
sudo apt install zenity