Hi,
I'm trying to use livecd-creator to make a "permanent" system that sits outside of a firewall (i.e. it's assigned a non-dhcp ip address, runs ssh for users that need to get into our internal network).
I can not get root login to work though. I have the following lines in my livecd-conf file:
# update user info echo 'root:$1$ncO9QrXs$.f63DbXQniCX41Pb8gMD1' | chpasswd -e passwd -S root useradd -c "SNOOPY User Account" -m -n \ -p '$1$2OOvrGlY$M3tBJfc9gfKvThcmqnOgo1' snoopy pwconv
When I boot the livecd though root logins fail with: login: pam_unix(login:auth): authentication failure; logname=LOGIN uid=0 euid=0 tty=tty1 ruser= rhost= user=root
login: FAILED LOGIN 1 FROM (null) FOR root, Authentication failure
The snoopy user account works fine though (and I can't su to root from that account).
I've verified by looking at the livecd image that the password is set properly in /etc/passwd and /etc/shadow. /etc/securetty is also ok.
How does one go about getting root logins on the livecd?
Thanks in advance for any replys.
On 4/9/07, pseudo vector ps3udov3ctor@gmail.com wrote:
Hi,
I'm trying to use livecd-creator to make a "permanent" system that sits outside of a firewall (i.e. it's assigned a non-dhcp ip address, runs ssh for users that need to get into our internal network).
I can not get root login to work though. I have the following lines in my livecd-conf file:
# update user info echo 'root:$1$ncO9QrXs$.f63DbXQniCX41Pb8gMD1' | chpasswd -e passwd -S root useradd -c "SNOOPY User Account" -m -n \ -p '$1$2OOvrGlY$M3tBJfc9gfKvThcmqnOgo1' snoopy pwconv
When I boot the livecd though root logins fail with: login: pam_unix(login:auth): authentication failure; logname=LOGIN uid=0 euid=0 tty=tty1 ruser= rhost= user=root
login: FAILED LOGIN 1 FROM (null) FOR root, Authentication failure
The snoopy user account works fine though (and I can't su to root from that account).
That error message looks like a generic authentication failure, but if you're sure you're typing in the password correctly, I would check the manpage for sshd_config. "PermitRootLogin" is one of the options whose value may need to change.
I've verified by looking at the livecd image that the password is set properly in /etc/passwd and /etc/shadow. /etc/securetty is also ok.
How does one go about getting root logins on the livecd?
As an alternative, I would recommend adding this to your livecd init script instead:
echo "snoopy ALL=(ALL) ALL" >> /etc/sudoers
On 4/9/07, Brian Cain brian.cain@gmail.com wrote:
That error message looks like a generic authentication failure, but if you're sure you're typing in the password correctly, I would check the manpage for sshd_config. "PermitRootLogin" is one of the options whose value may need to change.
I'm trying to log in from the terminal (tty1), not through ssh. /etc/securetty is set to allow root logins from tty1.
As an alternative, I would recommend adding this to your livecd init script instead:
echo "snoopy ALL=(ALL) ALL" >> /etc/sudoers
When the system is finally setup I don't want snoopy to be able to gain root access. I only mention that I can't su from the only other usable account as perhaps a hint to anyone that may know what is causing root to not to be able to login.
On 4/9/07, pseudo vector ps3udov3ctor@gmail.com wrote:
On 4/9/07, Brian Cain brian.cain@gmail.com wrote:
That error message looks like a generic authentication failure, but if you're sure you're typing in the password correctly, I would check the manpage for sshd_config. "PermitRootLogin" is one of the options whose value may need to change.
I'm trying to log in from the terminal (tty1), not through ssh. /etc/securetty is set to allow root logins from tty1.
Oh, I guess I didn't read closely enough. Have you executed the lines you're using in a shell on a fc6 system and verified that it works? I can't help thinking that chpasswd is mucking things up. Can you try and see if you can login if you echo a password to the passwd command? Even if you're nervous about a plaintext login on the livecd media, it's still worthwhile to execute for debugging's sake.
By "set properly", you mean that the contents of /etc/shadow matches what you have in your shell script?
On 4/9/07, Brian Cain brian.cain@gmail.com wrote:
Oh, I guess I didn't read closely enough. Have you executed the lines you're using in a shell on a fc6 system and verified that it works? I can't help thinking that chpasswd is mucking things up. Can you try and see if you can login if you echo a password to the passwd command? Even if you're nervous about a plaintext login on the livecd media, it's still worthwhile to execute for debugging's sake.
By "set properly", you mean that the contents of /etc/shadow matches what you have in your shell script?
Oh man, am I stupid. No I didn't try on an existing system, so sure was I that I had done everything right. I just did it though and found sure enough that the same encrypted pw doesn't work on another fc6 system. The problem? I use a shell script to encrypt the passwords. The password I'm trying to use has a $ in it. The shell expanded that $ and the subsequent text as a variable, since it didn't exist it expanded to 0, and encrypted that string instead of the one I intended. If I replace that part of the password string with a 0, voila, I can log in. Total PICNIC error.
Sorry to waste your time and the resources of the mailing list.
Thanks for your help.
-----Original Message----- From: fedora-livecd-list-bounces@redhat.com [mailto:fedora-livecd-list-bounces@redhat.com] On Behalf Of pseudo vector
...
Oh man, am I stupid. No I didn't try on an existing system, so sure was I that I had done everything right. I just did it though and found sure enough that the same encrypted pw doesn't work on another fc6 system. The problem? I use a shell script to encrypt the passwords. The password I'm trying to use has a $ in it. The shell expanded that $ and the subsequent text as a variable, since it didn't exist it
BTW, for bash scripts, you can avoid this problem by quoting your here doc delimiter. If it's quoted, bash will not do variable expansion.
Copy/paste these into a bash shell and see for yourself.
cat <<'EOF' test $one $two $three EOF
cat <<EOF test $one $two $three EOF
BTW, I've thought about submitting a patch for mayflower to help mitigate things like "shell quoting will be the death of me" but I keep not getting around to it. One of these days, I guess... :/
-Brian
livecd@lists.fedoraproject.org