WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: how to dislable auto login?  (Read 7205 times)

Offline bonox

  • Newbie
  • *
  • Posts: 2
how to dislable auto login?
« 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

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: how to dislable auto login?
« Reply #1 on: June 11, 2009, 01:09:19 AM »
/etc/inittab is probably the right idea: see the rungetty line, esp. the autologin part.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11050
Re: how to dislable auto login?
« Reply #2 on: June 11, 2009, 04:57:14 AM »
Copy /etc/inittab-save over /etc/inittab, and you'll get the regular few text logins.
The only barriers that can stop you are the ones you create yourself.

Offline bonox

  • Newbie
  • *
  • Posts: 2
Re: how to dislable auto login?
« Reply #3 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

Offline Fredux

  • Newbie
  • *
  • Posts: 5
Re: how to dislable auto login?
« Reply #4 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.

Offline alu

  • Sr. Member
  • ****
  • Posts: 429
Re: how to dislable auto login?
« Reply #5 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

Offline Fredux

  • Newbie
  • *
  • Posts: 5
Re: how to dislable auto login?
« Reply #6 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.

Offline alu

  • Sr. Member
  • ****
  • Posts: 429
Re: how to dislable auto login?
« Reply #7 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

Offline mikshaw

  • Sr. Member
  • ****
  • Posts: 368
Re: how to dislable auto login?
« Reply #8 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.

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
Re: how to dislable auto login?
« Reply #9 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.

Offline Fredux

  • Newbie
  • *
  • Posts: 5
Re: how to dislable auto login?
« Reply #10 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.