Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: bonox on June 10, 2009, 11:18:08 PM

Title: how to dislable auto login?
Post by: bonox on June 10, 2009, 11:18:08 PM
helo
I had succed install tiny core on hardisk (vbox hd), for secure reason, how to dislable auto login? or how to set default inittab, distro set initab default on 3 then login in text mode, then enter startx if we need go to X,
thank
Title: Re: how to dislable auto login?
Post by: ^thehatsrule^ on June 11, 2009, 01:09:19 AM
/etc/inittab is probably the right idea: see the rungetty line, esp. the autologin part.
Title: Re: how to dislable auto login?
Post by: curaga on June 11, 2009, 04:57:14 AM
Copy /etc/inittab-save over /etc/inittab, and you'll get the regular few text logins.
Title: Re: how to dislable auto login?
Post by: bonox on June 15, 2009, 05:06:17 AM
Thanks for info.
i will setup soon

daily i use  slax,
I still feel nervous with tinycorelinux, and feel amazing also... about 10 mb and it work :)
everything play on ram, so every reboot back to previous, i tray search menu for save configuration then find,  set tclocal directory then i got permanent opera, nano, mc  but still back to previous installation, and i will tray other

i had install apache but still not work, have any info?
where is mysql & phpmyadmin, i play Drupal so i need it all   
because  i am not familiar with sqlite 

Thanks
Title: Re: how to dislable auto login?
Post by: Fredux on August 03, 2009, 03:29:12 AM
Copy /etc/inittab-save over /etc/inittab, and you'll get the regular few text logins.

Not working: tc still logs in auto w/o asking for its pwd.

Even though I added etc/inittab to /opt/.filetool.lst, no effect.
Title: Re: how to dislable auto login?
Post by: alu on August 03, 2009, 04:08:15 AM
maybe: in your /home/tc/.profile, last line contents:

then startx

comment it out; or: comment out the last line of your /etc/skel/.profile file, and save it to /opt/.filetool.lst

i didn't try it myself
Title: Re: how to dislable auto login?
Post by: Fredux on August 03, 2009, 05:16:48 AM
maybe: in your /home/tc/.profile, last line contents:

then startx

comment it out; or: comment out the last line of your /etc/skel/.profile file, and save it to /opt/.filetool.lst

i didn't try it myself

Commenting out startx was pointless in both files. It just avoids X to start whilst tc is already auto logged-in.
Title: Re: how to dislable auto login?
Post by: alu on August 03, 2009, 07:44:57 AM
i see now what you want; maybe, you can edit the line USER in /etc/tc-config; it shows "tc", i don't know if it is safe to let it blank (USER=""), and then save the file in .filetool.lst, but it could be a possibility
Title: Re: how to dislable auto login?
Post by: mikshaw on August 03, 2009, 12:48:10 PM
The file /root/.profile does su - "$TCUSER" which automatically logs you in regardless of what you do with inittab.  So you'll need to change both /etc/inittab and /root/.profile, plus /etc/shadow for password.

As far as I can recall, TC doesn't have the telinit command, so if you're trying to restore inittab from a backup it probably won't work.  You may need to remaster.  In DSL I ran the command "telinit q" from bootlocal.sh in order to reread inittab restored from a backup.  In TC I remastered to use a custom inittab, and I haven't bothered to see if things have changed since.
Title: Re: how to dislable auto login?
Post by: danielibarnes on August 03, 2009, 03:46:24 PM
Quote
As far as I can recall, TC doesn't have the telinit command, so if you're trying to restore inittab from a backup it probably won't work.  You may need to remaster.

There is no telinit, but you can signal init to reload /etc/inittab with
kill -SIGHUP 1

However, this will not help as init will execute the autologin before you can signal it to reload inittab. The only way you can prevent auto-login is to re-create the tinycore.gz. For example,

mkdir /tmp/extract
cd /tmp/extract
zcat /path/to/tinycore.gz | cpio -i -H newc -d
cp etc/inittab-save etc/inittab
find | cpio -o -H newc | gzip > /path/to/tinycore.gz


If you need help with that, the wiki has more details.
Title: Re: how to dislable auto login?
Post by: Fredux on August 03, 2009, 05:18:43 PM
Quote
As far as I can recall, TC doesn't have the telinit command, so if you're trying to restore inittab from a backup it probably won't work.  You may need to remaster.

There is no telinit, but you can signal init to reload /etc/inittab with
kill -SIGHUP 1

However, this will not help as init will execute the autologin before you can signal it to reload inittab. The only way you can prevent auto-login is to re-create the tinycore.gz. For example,

mkdir /tmp/extract
cd /tmp/extract
zcat /path/to/tinycore.gz | cpio -i -H newc -d
cp etc/inittab-save etc/inittab
find | cpio -o -H newc | gzip > /path/to/tinycore.gz


If you need help with that, the wiki has more details.


SUCCESS!

Takes not even 2min to perform. Many thanks.