5

Most Linuxes I've seen are configured so that passwd doesn't ask root for the old password: root@xxx ~# passwd root Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Even if passwd does ask for it, you could try chpasswd, or edit /etc/passwd and /etc/shadow by hand (the password hash is the second field, the long ...


3

You can do this like in the following example: sudo -p 'Insert sudo password: ' echo "Hello World!"


3

For all the dancing around with read and cat and heredocs, ultimately command substitution will result in $(provide_pw) being replaced by the actual password. It will then be part of the process details. From man curl, about -u: On systems where it works, curl will hide the given option argument from process listings. So, on such systems, and also on ...


2

The standard documentation from man shadow should be installed on your system. On my Debian system it explains it like this: Each line of this file contains 9 fields, separated by colons (":"), in the following order: login name It must be a valid account name, which exist on the system. encrypted password Refer to crypt(3) for ...


1

x is not a hashed password, so its presence disables login by that username the ! on root has the same effect but it can be removed using usermod. An empty password column allows log-in with no password, so these filler symbols are needed.


1

The format is documented here: The .git-credentials file is stored in plaintext. Each credential is stored on its own line as a URL like: https://user:pass@example.com


Only top voted, non community-wiki answers of a minimum length are eligible