PDA

View Full Version : Disable auto login in Knoppix 6.2



rajasekaran
02-07-2010, 07:32 PM
Hi friends,

I have installed Knoppix 6.2 in my system... It works very nice.. I like it.

Unfortunately, it uses only knoppix live user.. I have created some other user accounts... But, I cant able to login using different user account. Knoppix user account login in automatically. Please help me to disable this option and get the login in screen.

Thanks in advance...

Capricorny
02-07-2010, 08:16 PM
It can be done - to convert Knoppix to an ordinary multi-user system. But the standard advice is, if you want to do this, install ordinary Debian instead. Put simply: If you have to ask about this, you probably shouldn't do it.

Harry Kuhman
02-07-2010, 09:00 PM
It can be done - to convert Knoppix to an ordinary multi-user system. But the standard advice is, if you want to do this, install ordinary Debian instead. Put simply: If you have to ask about this, you probably shouldn't do it.
Very good advice.

rajasekaran
02-08-2010, 03:40 PM
Hi friend,

Thanks for your reply... Now I have installed Knoppix 6.2 as single user... I cant seen any option to install it as Debian ( includes Multi user option) during the installation.... I remember that, I have select this option during Knoppix 5.3 installation... Can you say how to do that in 6.2... :?:

Harry Kuhman
02-08-2010, 03:57 PM
Knoppix isn't Debian. It is based on Debian. And it is a strange mix of different Debian versions that generally cause problems for people who try to install it to a hard disk.

You can not install Debian from the Knoppix disc.

However, you can go to the debian website at debian.org and download an install disc iso for any of the Debian versions. If you have high speed internet then I suggest downloading the net install disc iso. However, if you are on dial-up or don't have Internet access where you intend to install, I suggest disc 1 of the install discs (all of the discs are not needed and generally not a good idea to download unless you are planing on going where you will have no Internet access, and maybe not even then). Also, you will find that there are different versions of Debian available, I suggest staying away from "stable" for anything except a mission critical server system, it is too old. I suggest "unstable", although you might even want "testing". Don't be fooled by the names, "unstable" is far more stable than anything that Microsoft ever released. You can also pick from builds for various hardware. Knoppix uses the i386 code. if you have a typical PC you may want to use that or go with a 64 bit version for Intel or AMD cpus.

Once you have done a desktop install of Debian you will have multiple user support. You can then choose to install any or all of the application that are included in Knoppix, or pick from a huge selection of other programs in the Debian repository.

Capricorny
02-11-2010, 12:32 AM
Knoppix isn't Debian. It is based on Debian. And it is a strange mix of different Debian versions that generally cause problems for people who try to install it to a hard disk.

Actually, I experienced few version conflicts when installing/upgrading 6.0.1. 6.2 seems far worse in that respect. For example, I have not been able to install samba server because of conflicts!
But I can't see how this should be such an impossible problem to solve. And conversion utilities for Knoppix 6.2 -> Debian shouldn't be that hard to make.

For now, I think the easiest thing for converting is simply to take the installed package list for Knoppix and use it for Debian. This command will write the current package selection to a file

sudo dpkg --get-selections > Desktop/selections_20100210.txt

This list could then be used in/fed to a script for installing. (Currently, I have 1333 packages installed.)

zgregoryg
03-03-2011, 07:53 PM
Here I come again with a solution that works, instead of lame comments that don't solve anything... Like I did here:

http://www.knoppix.net/forum/threads/27518-how-to-start-samba-server-in-knoppix-6/page2

I'm not going to address using the Knoppix distro as your desktop system, however to disable autologin on Knoppix 6.2, create a boot thumb drive - use the directions supplied in the link above. This will create a writeable portion of the bootable thumb drive filesystem called UNIONFS.

One you have done that simply edit the /etc/inittab file as follows:

Replace lines like this:

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

With this:

1:12345:respawn:/bin/login </dev/tty1 >/dev/tty1 2>&1

Do this for all four tty entries and add tty5 and tty6 as well

Next change your default run level to 3 by changing id:5:initdefault to id:3:initdefault

Next make sure you set passwords for root and the knoppix user

as root

passwd root
passwd knoppix

Save the file and restart - you will now be booted into a console login screen which prompts for the username and password

Once you have logged in, boot into Xwindow if you so desire as follows

sudo /etc/init.d/knoppix-startx start

Whoo-hoo!

dinosoep
03-03-2011, 09:04 PM
Hey, capricorny, thats just crazy :p
So when I do that and try to put together some sort of script I can practically restore my system on any debian based distro?

Frattimonde
03-07-2011, 02:38 PM
how can one get at least it to ask for root password?

Capricorny
05-13-2011, 03:19 AM
Here I come again with a solution that works, instead of lame comments that don't solve anything... Like I did here:

http://www.knoppix.net/forum/threads/27518-how-to-start-samba-server-in-knoppix-6/page2

I'm not going to address using the Knoppix distro as your desktop system, however to disable autologin on Knoppix 6.2, create a boot thumb drive - use the directions supplied in the link above. This will create a writeable portion of the bootable thumb drive filesystem called UNIONFS.

One you have done that simply edit the /etc/inittab file as follows:

Replace lines like this:

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

With this:

1:12345:respawn:/bin/login </dev/tty1 >/dev/tty1 2>&1

Do this for all four tty entries and add tty5 and tty6 as well

Next change your default run level to 3 by changing id:5:initdefault to id:3:initdefault

Next make sure you set passwords for root and the knoppix user

as root

passwd root
passwd knoppix

Save the file and restart - you will now be booted into a console login screen which prompts for the username and password

Once you have logged in, boot into Xwindow if you so desire as follows

sudo /etc/init.d/knoppix-startx start

Whoo-hoo!

This can be really useful for many purposes: First, the runlevel change 5 ->3 can save the day when trying to get Knoppix up and running on new hardware. I had plenty of problems with graphics controllers and 6.2.X, some times I couldn't even troubleshoot. Setting up a USB stick with 3 as default is a safe way to proceed. Furthermore, when using a Knoppix machine as a server, the graphical interface is mostly unnecessary overhead. When using the machine for daily work, avoiding autologin can be important, and a natural solution would be to preset user and root passwords to something trivial, to be changed later if desirable. If such things can be sorted out for usb-based Knoppix, the reasons for full HD installs in fact become fewer. As for the link to the Samba server thread, falling back on tarball installs or compilation for standard component of a package-based system is a workaround, not a full solution. Packages save us an enormous lot of work in system administration.

dinosoep
06-01-2011, 09:27 PM
for the interested, I've been able to setup gdm and disabled autologin turning it into a real multi-user system :D

Capricorny
06-02-2011, 12:47 PM
for the interested, I've been able to setup gdm and disabled autologin turning it into a real multi-user system :D
Nice!
Would you care taking diffs of the altered scripts and post/upload them here?

dinosoep
06-02-2011, 01:09 PM
I've also altered other stuff so I can't post the patches but what I did was:
install gdm :p

edit /etc/init.d/knoppix-autoconfigure:
I changed


...
fi
}

start_sys(){
...

to


...
fi
}
start_gdm(){
addtask "gdm"; addprogress "Starting gnome display manager"
mkdir /var/log/gdm
/etc/init.d/gdm start > /dev/tty$LOG_CONSOLE
}
start_sys(){
...


and when you scroll a bit lower you'll see


# Start udev now, /dev will be remounted
checkbootparam "noudev" || start_udev

# Send logging messages to /dev/tty$LOG_CONSOLE. Since we need a socket
# in /dev, this requires udev to run earlier.
start_log

and I added after that


# Attempts to use gdm :p
start_gdm


Then in Inittab I have changed runlevel to 3, you already did this and I commented out

# 1:12345:respawn:/bin/bash -login < /dev/tty1 >/dev/tty1 2>&1
#1:12345:respawn:/bin/login </dev/tty1 >/dev/tty1 2>&1
#2:12345:respawn:/bin/login </dev/tty2 >/dev/tty2 2>&1
#3:12345:respawn:/bin/login </dev/tty3 >/dev/tty3 2>&1
#4:12345:respawn:/bin/login </dev/tty4 >/dev/tty4 2>&1
I don't remember why btw
and uncommented the getty lines


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


That should be all, if I forgot something don't shoot me :p

3CPO
07-16-2011, 07:46 AM
This could work.

Edit /etc/inittab:


# 1:12345:respawn:/bin/bash -login < /dev/tty1 >/dev/tty1 2>&1
#1:12345:respawn:bash -login </dev/tty1 >/dev/tty1 2>&1
#2:12345:respawn:bash -login </dev/tty2 >/dev/tty2 2>&1
#3:12345:respawn:bash -login </dev/tty3 >/dev/tty3 2>&1
#4:12345:respawn:bash -login </dev/tty4 >/dev/tty4 2>&1
1:12345:respawn:/sbin/getty 38400 tty1
2:12345:respawn:/sbin/getty 38400 tty2
3:12345:respawn:/sbin/getty 38400 tty3
4:12345:respawn:/sbin/getty 38400 tty4
5:12345:respawn:/sbin/getty 38400 tty5
6:12345:respawn:/sbin/getty 38400 tty6

# X mode
#x0:5:wait:sleep 2
#x1:5:respawn:/etc/init.d/knoppix-startx start
Install a login manager:
sudo apt-get install xdm

Edit /etc/rc.local and add this at the end before exit:
/etc/init.d/xdm start

Denver Dave
12-07-2011, 10:20 PM
how can one get at least it to ask for root password? That is the exact question I've been looking into.
I'm not going to address using the Knoppix distro as your desktop system I gather for reasons, probably beyond me, that Knoppix is not the right distribution for use for running desktop applications on a continual basis. Strangely enough, while ubuntu 11.04 worked find on my desktop, ubuntu 11.10 does not and neither does mint 12. (Both run fine on my laptop) I'm not sure I'm going to solve the issues on my desktop soon, so I I'm looking into knoppix which runs on not only my laptop and desktop, but also runs on an old pre wiindows XP PC that doesn't book with windows anymore.. I'm only one person, so I don't care about multi-user capabilities. I was thinking about Lubuntu (notice the L), but I see that the standard apps - Firefox, Thunderbird, GIMP have been replaced by other lighter weight alternates. I just found the debian distro and it might be a possibility - would be interesting to see if latest version runs on my desktop. Seems like I saw someplace that straight debian was not the best for novices, but don't see anything about that in the writeup so maybe that's not true. http://www.osdisc.com/cgi-bin/view.cgi/products/linux/debian/debian-603-8-dvd-set-pc.html

Capricorny
12-09-2011, 03:23 PM
That is the exact question I've been looking into. I gather for reasons, probably beyond me, that Knoppix is not the right distribution for use for running desktop applications on a continual basis. Strangely enough, while ubuntu 11.04 worked find on my desktop, ubuntu 11.10 does not and neither does mint 12. (Both run fine on my laptop) I'm not sure I'm going to solve the issues on my desktop soon, so I I'm looking into knoppix which runs on not only my laptop and desktop, but also runs on an old pre wiindows XP PC that doesn't book with windows anymore.. I'm only one person, so I don't care about multi-user capabilities. I was thinking about Lubuntu (notice the L), but I see that the standard apps - Firefox, Thunderbird, GIMP have been replaced by other lighter weight alternates. I just found the debian distro and it might be a possibility - would be interesting to see if latest version runs on my desktop. Seems like I saw someplace that straight debian was not the best for novices, but don't see anything about that in the writeup so maybe that's not true. http://www.osdisc.com/cgi-bin/view.cgi/products/linux/debian/debian-603-8-dvd-set-pc.html

Knoppix is very good for running desktop applications, and in this thread there are presented several alternatives for changing default startup/login settings. Including setting the root password. Personally, I have tended to avoid setting this because there were quite a few problems with it in some contexts in pre-6.0 Knoppix, but it seems to be less problematic now.

Usually, it is best to try the latest distro to avoid hardware problems - but beware that new bugs/incompatibilities may from time to time be introduced with new releases.

punch_t
09-08-2013, 10:52 AM
Hi Zgregoryg,

Knoppix was my first adventure into linux when the first live cd was created. I have used various distros since and have loved them all. I have just installed 7.2 on my hard disk to see what it can do so thank you for that it works treat.