I have some application that needs to create users that have the same password as others. Is there a way to do this without having to edit the /etc/shadow manually? Some sort of command? 
Duplicate a user, or at least the password
users
On Linux, you can do this with the useradd or usermod commands from the shadow utilities suite, because they accept a password hash as an option. You'll need to extract the other user's password hash from /etc/shadow manually.h=$(</etc/shadow awk -vuser=old_user_name -F: '$1==user {print $2}')useradd -p $h new_user_nameNote that if anyone obtains the shadow file, they'll know immediately that the two users have the same password, because the two hashes will be using the same salt. There's no way to fix that without having to enter the actual password (which cannot be recovered from /etc/shadow short of using brute force).Note that on most Linux installations, the command line of a running process is visible to all users. So if there are other users on the machine, they might be able to see the password hash (which gives them something they can try to brute-force offline). This can be fixed by using frameworks such as SELinux that hide process command lines from other users.