tropicalisland
MIS
Hi,
I have this shadow file in a chroot environment.
nobody:NP:6445::::::
noaccess:NP:6445::::::
nobody4:NP:6445::::::
test:eO6/aEEFF$8LA:12249::::::
nobody2:NP:6445::::::
noaccess2:NP:6445::::::
I would like to write a script to find and replace the shadow password where it matches a name. For example, If the script finds the user "test", it will replace the shadow password "eO6/aEEFF$8LA" with a new password.
I am new to scripting. I appreciate any help.
I have this shadow file in a chroot environment.
nobody:NP:6445::::::
noaccess:NP:6445::::::
nobody4:NP:6445::::::
test:eO6/aEEFF$8LA:12249::::::
nobody2:NP:6445::::::
noaccess2:NP:6445::::::
I would like to write a script to find and replace the shadow password where it matches a name. For example, If the script finds the user "test", it will replace the shadow password "eO6/aEEFF$8LA" with a new password.
I am new to scripting. I appreciate any help.