2026-03-12 20:23:15
This commit is contained in:
7
vdh/get_escaped_pwd.sh
Normal file
7
vdh/get_escaped_pwd.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/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 }'
|
||||
Reference in New Issue
Block a user