How to set up to allow local root login in Linux ?
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix administration > How to set up to allow local root login in Linux ?




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

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


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-15-05 11:05 PM

rt.

Thanks






[ Post a follow-up to this message ]



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


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-15-05 11:05 PM

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

> rt.
>
> Thanks

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





[ Post a follow-up to this message ]



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


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-15-05 11:05 PM

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






[ Post a follow-up to this message ]



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


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-15-05 11:05 PM

On 15 Dec 2005 10:22:30 -0800, yezi <ye_line@hotmail.com> wrote:
> I am sorry, the question is just allow the local root login.

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?






[ Post a follow-up to this message ]



    Re: How to set up to allow local root login in Linux ?  
phil-news-nospam@ipal.net


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-15-05 11:05 PM

On 15 Dec 2005 09:56:29 -0800 yezi <ye_line@hotmail.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/ 
|
----------------------------------------------------------------------------
-





[ Post a follow-up to this message ]



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


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-17-05 07:48 AM

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

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

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





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 03:39 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register