Results 1 to 3 of 3

Thread: Switching user-id

  1. #1

    Switching user-id

    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 ?

  2. #2
    redhead's Avatar
    Join Date
    Jun 2001
    Copenhagen, Denmark
    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.

  3. #3
    Good Guru
    Schotty's Avatar
    Join Date
    Jul 2001
    Milwaukee, WI
    I would check that the users are allowed to login.
    [andrew@andrew-desktop-fedora ~]$ grep andrew /etc/passwd
    [andrew@andrew-desktop-fedora ~]$
    As you can see, my user, andrew, has

    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.

Similar Threads

  1. Switching boxes
    By Kejpa in forum Linux - General Topics
    Replies: 1
    Last Post: 12-05-2008, 02:19 PM
  2. switching advice
    By wouter in forum Linux - General Topics
    Replies: 2
    Last Post: 09-22-2006, 02:22 PM
  3. Macosx Fast User Switching & How it's done on linux.
    By comtux in forum Linux - General Topics
    Replies: 6
    Last Post: 01-06-2005, 05:44 AM
  4. Switching Fully to Linux
    By BJ250 in forum Linux - Software, Applications & Programming
    Replies: 10
    Last Post: 08-19-2003, 02:39 AM
  5. Switching to Windows
    By in forum Windows - General Topics
    Replies: 19
    Last Post: 04-05-2003, 07:46 AM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts