0

From manpage of login

The login program is used to establish a new session with the system. It is normally invoked automatically by responding to the login: prompt on the user's terminal. login may be special to the shell and may not be invoked as a sub-process. When called from a shell, login should be executed as exec login which will cause the user to exit from the current shell (and thus will prevent the new logged in user to return to the session of the caller). Attempting to execute login from any shell but the login shell will produce an error message.

In graphical console, I could run exec sudo login t on an interactive nonlogin bash shell in a terminal emulator lxterminal. So what do "login may be special to the shell and may not be invoked as a sub-process" and "Attempting to execute login from any shell but the login shell will produce an error message" mean?

But I also notice that when I switch to a text console by Ctrl+Alt+F2, I got error messages, and are they related to the quotes? Thanks.

enter image description here

1

The login shell is special because it sets up the environment and runs login scripts and is the "session leader" (so if is killed, all its child processes are killed as well.) Other than those items, it's essentially the same as other shells.

However, the error that you're getting on the console is completely unrelated to login: it's an error with the USB device (EPROTO), discussed here and here. You may want to try testing the network adapter on another computer, changing the USB port used, changing the cable (if it uses one), and possibly disabling autosuspend.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.