LinuxQuestions.org
Visit Jeremy's Blog.
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, 02:07 PM   #1
Eldarby
LQ Newbie
 
Registered: May 2011
Distribution: Arch
Posts: 25

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, 02: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, 04:13 PM   #3
Eldarby
LQ Newbie
 
Registered: May 2011
Distribution: Arch
Posts: 25

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, 06:53 PM   #4
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,014

Rep: Reputation: 147Reputation: 147
"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, 10:35 AM   #5
Eldarby
LQ Newbie
 
Registered: May 2011
Distribution: Arch
Posts: 25

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 05:46 PM.
 
  


Reply

Tags
arch, chroot, login, slackware


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 06:35 AM
"cant login, login incorrect"init : Id "x" respawning too fast:disabled for 5 minutes allenwoxx Linux - Newbie 1 11-21-2008 11:45 AM
serial console - working, then "stuck" output and can't login srfeo Linux - General 0 03-29-2007 05:45 AM
Howto disable "Graphical Login" or "Standard Login?" the_gripmaster Red Hat 1 07-08-2004 03:55 PM


All times are GMT -5. The time now is 08:04 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration