Question: Does anyone know of any methods to perform a second login without using su, or a means to use su that requires the user to enter their username after the su command is issued?Situation:  We have multiple types of devices that login to a Linux server.  The users can then choose from options on a menu to execute.  The devices auto login to the system with a different account for each device.  The reason we do this is to limit the number of setup accounts to maintain on the devices to one per device.  The ssh clients we have that we can use all tie an automatic login name to the device account in use (see Juice ssh on android for one example).  Maintaining 40 plus accounts per device on each app is too much overhead for us.Goal: After the device logs in (primary login) provide a secondary login for the user that will allow them to enter their user id and password.  My first inclination would have been 'su', but 'su' needs a username provided with the command or it defaults to root account.  To keep things simple, I am trying avoid writing more shell code to prompt for the username before issuing a command such as 'su - $username' to accomplish this.Naturally, any application they login to already asks for username and password, but dropping to the shell and other home built functions rely on the login to provide authentication.
Auto login by device followed by login by user?
linux;shell;login
What does it matter just getting users to type su - username in the shell, if they must type their username and password in any way?  Only 5 extra characters typing :).If it's not acceptable by users and you are so lazy as not to want to write single script anymore, just install telnet and telnetd on the server and put the following alias in /etc/bash.bashrc.alias x='telnet localhost'Updated:  Don't forget to restrict remote accesses to telnetd port (tcp/23).  You can set up firewall (iptables) or traditional TCP wrapper (/etc/hosts.allow, /etc/hosts.deny - consult hosts_access(5) manual page).