PDA

View Full Version : Ask for password on boot



m_aguilella
09-10-2004, 10:53 PM
Dear friends,

I have installed knoppix in my hd manually (I wanted to save previous data already present in my disk), following the steps found at the end of the FAQ included in knoppix 3.6. Everything went OK, except some problems running lilo (They are still present:
/dev/mapper/control: open failed: No such device
Is device-mapper driver missing from kernel?).

Now the system boots ok BUT I can't make the system to ask for password at boot. It simply opens a root terminal, which is very inconvenient in terms of security. What can I do for solving this? Any idea?

Thank you in advance

Marcel

tempo
09-11-2004, 12:24 AM
You better should not install manually, it was better
tar cpPvvf marcel.tar /home/marcel
instead, and cp marcel.tar somewhere/not_used_by_knoppix,
and later after knoppix-installer finished
tar xvvf marcel.tar

apropos password: to set one try to type in an open root terminal:
passwd root
and as root
passwd marcel
(or whatever your user name is)

hth

m_aguilella
09-11-2004, 11:45 AM
Well, I thought on saving previously, but the data is really BIG (several GB) and my disk is not, so I decide to do this way. Now, what can I do?

I have already defined password for me and root (simply do Ctrl-Alt-F2, exec "passwd" and defining), also I included myself as regular user, deleted knopix user, changed some sripts. and it works VERY well, except this annoying "boot on root". It should be something simple, but I am lost. My last resort will be reinstall using knopix-installer, but if there are no ideas, I will do ... :(

Thank you.

Marcel

tempo
09-11-2004, 03:48 PM
Hi Marcel,
I did some research and found out that you should inspect your /etc/inittab file especially the section simile to this:

1:12345:respawn:/bin/bash -login >/dev/tty1 2>&1 </dev/tty1
2:2345:respawn:/bin/bash -login >/dev/tty2 2>&1 </dev/tty2
3:2345:respawn:/bin/bash -login >/dev/tty3 2>&1 </dev/tty3
4:2345:respawn:/bin/bash -login >/dev/tty4 2>&1 </dev/tty4

it should rather look like this:

1:12345:respawn:/sbin/getty 38400 tty1
2:2345:respawn:/sbin/getty 38400 tty2
3:2345:respawn:/sbin/getty 38400 tty3
4:2345:respawn:/sbin/getty 38400 tty4
5:2345:respawn:/sbin/getty 38400 tty5
6:2345:respawn:/sbin/getty 38400 tty6

( "-login" is maybe crucial here)

in my file these two lines are preceded with #
w5:5:wait:/bin/sleep 2
x5:5:wait:/etc/init.d/xsession start
but this maybe has no influence.

further, look at your /etc/passwd and /etc/shadow files (as root).

in /etc/shadow there should be an odd string for root i.e KllMTzUYwaaP if root password is correctly set:
Example:
password not set:
root:*:11456:0:99999:7:::
password set:
root:KllMTzUYwaaPr:12672:0:99999:7:::
The same is alike for each user whos password is set.


FYI here is the complete difference between CD version of /etc/inittab and hd-installed version using knoppix-installer (issued diff command) :

root@box:/home/tempo#diff /etc/inittab /home/tempo/CD-etc/inittab
22c22
< l0:0:wait:/etc/init.d/rc 0
---
> l0:0:wait:/etc/init.d/knoppix-halt
28c28
< l6:6:wait:/etc/init.d/rc 6
---
> l6:6:wait:/etc/init.d/knoppix-reboot
31c31
< ca::ctrlaltdel:/sbin/shutdown -r now
---
> ca::ctrlaltdel:/etc/init 0
48,53c48,53
< 1:12345:respawn:/sbin/getty 38400 tty1
< 2:2345:respawn:/sbin/getty 38400 tty2
< 3:2345:respawn:/sbin/getty 38400 tty3
< 4:2345:respawn:/sbin/getty 38400 tty4
< 5:2345:respawn:/sbin/getty 38400 tty5
< 6:2345:respawn:/sbin/getty 38400 tty6
---
> # 4 virtual consoles with immortal shells
> 1:12345:respawn:/bin/bash -login >/dev/tty1 2>&1 </dev/tty1
> 2:2345:respawn:/bin/bash -login >/dev/tty2 2>&1 </dev/tty2
> 3:2345:respawn:/bin/bash -login >/dev/tty3 2>&1 </dev/tty3
> 4:2345:respawn:/bin/bash -login >/dev/tty4 2>&1 </dev/tty4
>
74,75c74,75
< #w5:5:wait:/bin/sleep 2
< #x5:5:wait:/etc/init.d/xsession start
---
> w5:5:wait:/bin/sleep 2
> x5:5:wait:/etc/init.d/xsession start

m_aguilella
09-11-2004, 10:54 PM
Hi tempo,

Changed "inittab", all works perfect now :D . Thanks a lot for your help and your time!!

Marcel