Professional Web Applications Themes

How to set up to allow local root login in Linux ? - Linux / Unix Administration

rt. Thanks...

  1. #1

    Default How to set up to allow local root login in Linux ?

    rt.

    Thanks

    yezi Guest

  2. #2

    Default Re: How to set up to allow local root login in Linux ?

    On 15 Dec 2005 09:56:29 -0800, yezi wrote:
     

    On most versions of Linux it is allowed by default. Which Distro are you
    running.
    Adam
    Adam Guest

  3. #3

    Default Re: How to set up to allow local root login in Linux ?

    I am sorry, the question is just allow the local root login.

    yezi Guest

  4. #4

    Default Re: How to set up to allow local root login in Linux ?

    On 15 Dec 2005 09:56:29 -0800 yezi <com> wrote:

    | Subject: Re: How to set up to allow local root login in Linux ?
    |
    | rt.
    |
    | Thanks

    I do it by putting the following in /etc/inittab, replacing an existing
    tty entry:

    =====<CUT HERE>=========<CUT HERE>=========<CUT HERE>=========<CUT HERE>=====
    #-----------------------------------------------------------------------------
    # Define console logins to start.
    # If you cannot trust your physical security, do not use autologin.
    #-----------------------------------------------------------------------------
    c1:12345:respawn:/sbin/agetty -n -l /etc/autologin 38400 tty1 linux
    # c1:12345:respawn:/sbin/agetty 38400 tty1 linux
    =====<CUT HERE>=========<CUT HERE>=========<CUT HERE>=========<CUT HERE>=====

    as well as:

    =====<CUT HERE>=========<CUT HERE>=========<CUT HERE>=========<CUT HERE>=====
    #-----------------------------------------------------------------------------
    # Define serial port logins.
    # If you cannot trust your physical security, do not use autologin.
    #-----------------------------------------------------------------------------
    s0:12345:respawn:/sbin/agetty -n -l /etc/autologin 9600 ttyS0 vt100
    # s1:12345:respawn:/sbin/agetty -n -l /etc/autologin 9600 ttyS1 vt100
    # s0:12345:respawn:/sbin/agetty 9600 ttyS0 vt100
    # s1:12345:respawn:/sbin/agetty 9600 ttyS1 vt100
    =====<CUT HERE>=========<CUT HERE>=========<CUT HERE>=========<CUT HERE>=====

    Then I have this script named "/etc/autologin":

    =====<CUT HERE>=========<CUT HERE>=========<CUT HERE>=========<CUT HERE>=====
    #!/bin/bash
    pid="$$"
    dev=$( /usr/bin/find "/proc/${pid}/fd/0" -maxdepth 0 -type l -printf '%l\n' )
    tty=$( echo "${dev}" | /usr/bin/cut -d / -f 3 )
    speed=$( /usr/bin/stty -a | /usr/bin/head -1 | /usr/bin/cut -d ' ' -f 2 )
    if [[ -x "/etc/autologin-${tty}-OK" ]]; then
    echo ""
    echo "Welcome to `exec uname -s` `exec uname -r`."
    echo ""
    echo "`exec uname -n` login: root"
    echo "Password:"
    cd /root
    export AUTOLOGIN=1
    export AUTOLOGIN_DEV="${dev}"
    export AUTOLOGIN_TTY="${tty}"
    export AUTOLOGIN_SPEED="${speed}"
    exec /bin/su -
    fi
    if [[ -c "${dev}" ]]; then
    exec /sbin/agetty "${speed}" "${tty}" linux
    fi
    echo "Unable to enable console ${dev}"
    if [[ -x /bin/sleep ]]; then
    exec /bin/sleep 3600
    fi
    exec /usr/bin/sleep 3600
    =====<CUT HERE>=========<CUT HERE>=========<CUT HERE>=========<CUT HERE>=====

    Then I touch the following files into existance:

    /etc/autologin-tty1-OK
    /etc/autologin-ttyS1-OK

    Your mileage may vary, but mine gets me there.

    --
    -----------------------------------------------------------------------------
    | Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
    | (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |
    -----------------------------------------------------------------------------
    phil-news-nospam@ipal.net Guest

  5. #5

    Default Re: How to set up to allow local root login in Linux ?

    On 15 Dec 2005 10:22:30 -0800, yezi <com> wrote: 

    First, you need to quote what and who you're responding to, or your
    message makes no sense.

    Second, what specifically do you need the root account for?

    Dave Guest

  6. #6

    Default Re: How to set up to allow local root login in Linux ?

    On 15 Dec 2005 10:22:30 -0800, yezi wrote:
     

    off and do your own homework. If you can't answer civil questions with
    reasonable answers then you don't deserve any help.
    Adam Guest

Similar Threads

  1. changing local root folder
    By Jim in Merced CA in forum Macromedia Dynamic HTML
    Replies: 3
    Last Post: January 4th, 12:05 AM
  2. can't login as root
    By knocte in forum Linux Setup, Configuration & Administration
    Replies: 20
    Last Post: September 27th, 10:34 PM
  3. login: ROOT LOGIN ttyp0 from
    By Anthony in forum Sun Solaris
    Replies: 6
    Last Post: August 30th, 08:17 PM
  4. can't login as root on gdm
    By Icarus in forum Debian
    Replies: 2
    Last Post: August 11th, 12:40 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139