Find the answer to your Linux question:
Results 1 to 2 of 2
I am pretty new to linux (RedHat 8.0), really need some help here. We are porting a HP-UX system on to RedHat. The system is an automated system. When PC ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2004
    Posts
    3

    How to use gnome-terminal -e login


    I am pretty new to linux (RedHat 8.0), really need some help here.

    We are porting a HP-UX system on to RedHat.

    The system is an automated system.
    When PC boot,
    we use the autologin feature, login as USERA,
    the system will starts automatically,
    user interact with the system through menu and buttons.

    In the old system, the operator can start a terminal sessin
    by clicking on a menu item.
    We used to run 'hpterm -e login&'

    The RedHat system, i thought i use 'gnome-terminal -e login'

    i notice the 3 different login behavior,
    notice we already autologin as USERA

    1. gnome-terminal -e login
    login: USERB
    Password: XXXXX

    Login Incorrect

    2. gnome-terminal -e login
    login: USERA (login as myself)
    Password: XXXXX

    Login CRASH

    3. gnome-terminal -e login
    login: root
    Password: XXXXX

    Login CRASH

    Please Help,


    /etc/pam.d/login

    #%PAM-1.0
    auth required /lib/security/pam_securetty.so
    auth required /lib/security/pam_stack.so service=system-auth
    auth required /lib/security/pam_nologin.so
    account required /lib/security/pam_stack.so service=system-auth
    password required /lib/security/pam_stack.so service=system-auth
    session required /lib/security/pam_stack.so service=system-auth
    session optional /lib/security/pam_console.so


    /etc/pam.d/system-auth

    #%PAM-1.0
    # This file is auto-generated.
    # User changes will be destroyed the next time authconfig is run.
    auth required /lib/security/pam_env.so
    auth sufficient /lib/security/pam_unix.so likeauth nullok
    auth required /lib/security/pam_deny.so

    account required /lib/security/pam_unix.so

    password required /lib/security/pam_cracklib.so retry=3 type=
    password sufficient /lib/security/pam_unix.so nullok use_authtok md5 shadow
    password required /lib/security/pam_deny.so

    session required /lib/security/pam_limits.so
    session required /lib/security/pam_unix.so


    Terry

  2. #2
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    I'm guessing that HP-UX /bin/login is SUID root, right? On Linux systems it normally isn't, and thus you can't make a program that USERA starts to either call setuid() or read the shadow file.

    Instead, try using su instead. Try making the terminal call a shell script that looks something like this:
    Code:
    #!/bin/sh
    
    echo -n 'User name: '
    read username
    exec su - "$username"

Posting Permissions

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