LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-23-2013, 01:07 PM   #1
Eldarby
LQ Newbie
 
Registered: May 2011
Distribution: Arch
Posts: 27

Rep: Reputation: 1
Post Trying to set up a "clean" chroot login at console in Slackware - can't login


Hey everyone, I'm running Slackware 14.0 and I'm trying to set up a console login for my Arch chroot. My intention is to have a "clean" login environment for the chroot. If I run chroot normally while logged in as root...
Code:
# chroot /mnt/chroot/arch /bin/bash
... it copies over my environment variables from Slackware's root login. Arch uses some different environment variables than Slackware, which is why it's very important that I don't pass any through the host environment to the chroot, and instead login in a way that will run the chroot's own /etc/profile and so forth. This would additionally give non-root users a way to login to Arch without needing to have root privileges to chroot first.

Here's where I'm stuck:

After installing Arch in a chroot and making sure to bind-mount all the necessary directories, I took a hint from this guide (as well as some other guides I found related to creating Gentoo chroots in Slackware that suggested the same thing), and added the following to my /etc/inittab:
Code:
c7:12345:respawn:/usr/bin/chroot /mnt/chroot/arch /sbin/agetty 38400 tty8 linux
I ran 'init q', hit Ctrl+F8 and sure enough there was a fresh new console login with "Arch Linux" instead of the usual "Welcome to Linux" at the top. However, when I tried logging in, I just got hit with "Login incorrect" every single time.

I was trying to login as root and I know I got my password right, after typing it several times, very slowly and deliberately, looking at the keys and everything to be sure. I even ran passwd in the chroot, set the password again, and tried again in the console login. Login incorrect. I can still login on my Slackware tty's, but this new one just doesn't seem to be taking correctly.

Do I not have the inittab configured correctly? Is there something else I need to do? I realize that guide I'm referencing is from back in 2007, so I don't know how much may have changed since then.

I'd really like to be able to benefit from Arch's selection of packages, while still having peace of mind knowing it's safely cradled under a stable Slackware installation in case anything goes horribly wrong. Any help and advice is appreciated. Oh, and before anyone suggests virtualization as an alternative, that just isn't an option -- my computer is simply too old to do that efficiently.
 
Old 07-24-2013, 01:35 PM   #2
MasterOfMagic
LQ Newbie
 
Registered: Sep 2003
Posts: 6

Rep: Reputation: Disabled
Did you set your root password in the Arch chroot? If not then it's no surprise that your password isn't working to log into the chroot. You might also want to look at the log files to see if login is writing any errors to them. To rule out the password issue do the following from your Slackware host system:

Code:
# chroot /mnt/chroot/arch /usr/bin/passwd
This will set up root's password in the chroot and then you should be able to login.
 
1 members found this post helpful.
Old 07-26-2013, 03:13 PM   #3
Eldarby
LQ Newbie
 
Registered: May 2011
Distribution: Arch
Posts: 27

Original Poster
Rep: Reputation: 1
I used the command you suggested, even set the password to "taco" to make sure I'd type it right, but it still didn't work. Then I looked in my log files, and /var/log/secure was saying this:

Code:
Jul 26 15:51:26 slackbook login: pam_securetty(login:auth): access denied: tty 'tty8' is not secure !
Jul 26 15:51:30 slackbook login: FAILED LOGIN 1 FROM tty8 FOR root, Authentication failure
I'm not quite sure what's going on here or how to fix it, but at least we've got some sort of lead on the problem now, so thank you for suggesting to look in the logs. I ran several searches in multiple search engines regarding that error but no results relevant to this issue came up. I'm still quite stuck on what to do next. Any ideas?
 
Old 07-26-2013, 05:53 PM   #4
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,177

Rep: Reputation: 235Reputation: 235Reputation: 235
"tty 'tty8' is not secure" means tty8 is not in /etc/securetty

For details please do a web search.
 
1 members found this post helpful.
Old 07-28-2013, 09:35 AM   #5
Eldarby
LQ Newbie
 
Registered: May 2011
Distribution: Arch
Posts: 27

Original Poster
Rep: Reputation: 1
I see, now I understand what's happening, thank you.

<EDIT> There was a bit of a rant against search engines here earlier, but I'll just stick that in a blog or something later. It doesn't really belong here. </EDIT>

Anyway, I managed to solve the problem!

I ultimately decided I didn't really need an eighth tty anyway, so instead of adding tty8 to /etc/securetty, I removed the line I originally added to /etc/inittab and changed the c6 line to read:
Code:
c6:12345:respawn:/usr/bin/chroot /mnt/chroot/arch /sbin/agetty 38400 tty6 linux
After rebooting (since tty6 was already spawned by Slackware last boot), I was able to successfully login to my chroot through tty6. Thank you and MasterOfMagic for helping me through this tangled web of confusion.

Last edited by Eldarby; 07-28-2013 at 04:46 PM.
 
  


Reply

Tags
arch, chroot, login, slackware



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to disable "last login log" & disable "last login message" when start login. hocheetiong Linux - Newbie 4 02-08-2011 05:35 AM
"cant login, login incorrect"init : Id "x" respawning too fast:disabled for 5 minutes allenwoxx Linux - Newbie 1 11-21-2008 10:45 AM
serial console - working, then "stuck" output and can't login srfeo Linux - General 0 03-29-2007 04:45 AM
Howto disable "Graphical Login" or "Standard Login?" the_gripmaster Red Hat 1 07-08-2004 02:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration