Login is a program designed to be run from the login prompt, not to be used as a "user switching tool". To switch user in a shell, use 'su', ie:
# su -l <user>
Hello to everybody !
I have recently installed RedHat EL 3 in a server. Apart from root I have created two other users. I have encountered the following problems :
1. If I login through root, I cannot use the 'login' command to switch to a different user - the session terminates. 'nologin' does not exist in /etc.
2. If I login as, say, hiten, I cannot switch to a different user using 'login'. It says 'Incorrect login' even if I enter the correct user-id and password.
Would you please help me ?
Login is a program designed to be run from the login prompt, not to be used as a "user switching tool". To switch user in a shell, use 'su', ie:
# su -l <user>
Don't worry Ma'am. We're university students, - We know what We're doing.
'Ruiat coelum, fiat voluntas tua.'Datalogi - en livsstil; Intet liv, ingen stil.
I would check that the users are allowed to login.
As you can see, my user, andrew, has[andrew@andrew-desktop-fedora ~]$ grep andrew /etc/passwd
andrew:x:500:500:Andrew:/home/andrew:/bin/bash
[andrew@andrew-desktop-fedora ~]$
User ID 500
Group ID 500
Real name Andrew
Home Dir /home/andrew
Shell /bin/bash
The last is important. Setting this to a bogus shell will not allow users to have shell access. I implement this for mail only accounts or for just SMB share users. If this is nologin for your users, change it using usermod (on the CLI) or the GUI Users tool.
Bookmarks