|
The best way is just to manually type the password in at the password prompt, rather than putting a password in a script anyway.
I wouldn't recommend it unless you are very sure you know what you are doing, but you could write a script to edit /etc/shadow or /etc/security/password depending on your OS and insert the password hash into the correct field.
|