New Xton Documentation Center
Xton help has moved. Please visit the current version of this page for the most recent updates. Our new documentation center can be found at help.xtontech.com.
What command is executed when the “Password Reset Remote SSH” is run?
The “Password Reset Remote SSH” script uses different methods for root (id=0) account (passwd that asks for only new password) and other accounts (passwd that asks for existing password and then for new passwords). This script also uses shadow account when specified to run password reset using the passwd USER command.
The script “Password Reset Remote Root” can only reset password for root account without any shadow records. However, this script could be used as an example to develop custom password reset scripts for specific scenarios not covered by “Password Reset Remote SSH” script.
The “Password Reset Remote SSH” script executed for the record without shadow record
if [ "`id -u`" -eq 0 ]; then passwd <<EOF\n{{NEWPWD}}\n{{NEWPWD}}\nEOF echo xtam passwd error code: $? else passwd <<EOF\n{{OLDPWD}}\n{{NEWPWD}}\n{{NEWPWD}}\nEOF echo xtam passwd error code: $? fi
The “Password Reset Remote SSH” script executed for the record with shadow record
sudo -S passwd {{LOGIN}} <<EOF\n{{NEWPWD}}\n{{NEWPWD}}\nEOF echo xtam passwd error code: $?