- I would seriously think before "logging in as some other user but myself". There are laws and privacy policies that normally forbid such behaviour without user's approval.
- Please use good passwords. Good passwords take 3-5 seconds of your time and give you tons of security layers.
- Avoid these solutions for servers that are connected to the Internet.
- Please make sure your user does not have an encrypted home or encrypted private directories. The user can lose their data if they don't know their old password.
Solution 1
sudo passwd myotheruser
Use "x" as password.
Then login as myotheruser with password "x":
sudo login myotheruser
Solution 2
There is another solution, using pam.d without password:
http://www.linuxquestions.org/questions/debian-26/switch-users-without-entering-password-868218/
Namely, you have to:
sudo addgroup nopasswdlogin
sudo adduser myotheruser nopasswdlogin
Then change the file /etc/pam.d/login and place this somewhere before "@include common-auth" line:
auth sufficient pam_succeed_if.so user ingroup nopasswdlogin
Again, please use good passwords, you don't want to be featured on websites such as http://www.zone-h.org/ :)