Files
oracle/vdh/get_escaped_pwd.sh

7 lines
310 B
Bash
Raw Permalink Normal View History

2026-03-12 21:23:47 +01:00
#!/bin/bash
# grep the user passed as script parameter in /etc/shadow and prints is escaped encrypted password.
# to be used when recreating users with the encrypted password (when the actual password is not known)
# execute as root
grep $1 /etc/shadow | awk -F':' '{ gsub(/\$/,"\\$",$2); print $1 ": " $2 }'