How to open password change dialog from gnome-control-center from the terminal?

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?

enter image description here

3

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-accounts

from where a single click opens the dialog.

4

You 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 done

You will need to install zenity if it is not already installed like so:

sudo apt install zenity

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like