On Mon, Jan 5, 2009 at 3:06 PM, Tom Panzarella
<> wrote:
> Hi Ted,
>
> Thanks for the reply. See comments in-line below...
>
> On Jan 5, 2009, at 2:10 PM, Theodore A. Roth wrote:
>
>> On Mon, Jan 5, 2009 at 5:52 AM, Tom Panzarella
>> <> wrote:
>>> Hello,
>>>
>>> I have been working with the TS-7300 for a few years now and we are
>>> getting ready to start moving our applications to the TS-7800. When
>>> working with the 7800 it follows a similar paradigm as the 7300 in
>>> that there is the "fastboot" or "busybox" environment as well as the
>>> "full boot" or Debian environment. I am trying to set the root
>>> password on the board. When in Debian ("full boot") the UNIX passwd
>>> utility works as expected. I now have a root password and can run
>>> sshd
>>> to authenticate root using that new password. In the busybox
>>> ("fastboot") environment, that does not seem to work. Initially, I
>>> expected the authentication process of the fastboot environment to
>>> simply reference the new /etc/passwd file (created by setting the
>>> root
>>> password via Debian). I still can log in to the board in the
>>> "fastboot" environment using telnet (root w/ no password) and sshd
>>> will not allow me to log in as root in the fastboot envrionment b/c
>>> it
>>> is having trouble with the new password. So, I tried to re-run
>>> 'passwd' from fastboot to see if that helped, but the filesystem on
>>> which /etc/passwd is located is mounted read-only. So, I remounted it
>>> as read-write, ran 'passwd', then remounted as 'read-only'. It seemed
>>> to work. After rebooting, sshd would not authenticate root using the
>>> new password in the fastboot environemnt and via telnet root could
>>> still log in w/o a password. When full booting into Debian, sshd (and
>>> telnet) authenticates root with the new password without a problem.
>>>
>>> With all of the above background being said... does anyone have
>>> advice
>>> on how to set a root password on the TS-7800 that will be applied in
>>> both the fullboot/Debian environment as well as the fastboot/Busybox
>>> environment?
>>>
>>
>> Don't forget that when you are running from the fastboot env you are
>> running from ram via a ramdisk. Any changes that you make will be lost
>> after reboot. You need to set the password in the on board flash or
>> sdcard partition for the initrd. That would be partition 3 on the
>> sdcard. Don't remember which partition that would be for the on board
>> flash.
>>
>
> So, I have done things like customized the /linuxrc-fastboot file and
> persisted it via the busybox `save' command and that all works. Taking
> this same approach with my password problem did not (seem to) work.
> Here is what I did:
>
> 1. Since /etc is symlinked to /mnt/root/etc in fastboot and /mnt/root/
> etc is mounted ro, I remounted it as rw:
>
> # mount -o remount,rw /mnt/root
>
> 2. Changed the password:
>
> # passwd
> ...
> ...
>
> 3. Remounted as ro:
>
> # mount -o remount,ro /mnt/root
>
> 4. Tried to persist any changes (didn't think this applied for /etc/
> passwd, but I was going on your suggestion as I have only just started
> working with the 7800):
>
> # save
>
> 5. Then I rebooted. Again, telnet lets root login with no password and
> sshd cannot authenticate root b/c empty passwords are not allowed (in
> my sshd config).
>
> So, I still have the problem of not being able to synchronize my
> Debian fullboot root password with the fastboot root password. Does
> the fastboot environment authenticate by a different means than the
> Debian environment?
>
> Again, thanks for your suggestion Ted. Unless I took the advice the
> wrong way, I don't think it did the trick for me???
From: http://man-wiki.net/index.php/1:busybox
telnetd
telnetd [OPTION]
Telnetd listens for incoming TELNET connections on PORT. Options:
-p PORT listen for connections on PORT (default 23)
-l LOGIN exec LOGIN on connect (default /bin/sh)
-f issue_file Display issue_file instead of /etc/issue
The /sbin/telnetd program in the initrd is a link to busybox. If you
change your linuxrc-fastboot file to use this command:
/sbin/telnetd -l /mnt/root/bin/login
then you should be asked for a password when logging in via telnet.
Since telnetd from busybox defaults to /bin/sh, I suspect that is why
you are not asked for a passed.
You might need to add "pts/0" to the /etc/securetty file if you get
the "Login incorrect" message without being asked for a password when
logging in as root. [ Ref:
http://tldp.org/LDP/LGNET/issue50/tag/38.html ]
When you are running from initrd and have a prompt, can you grep for
root in the /etc/passwd and /etc/shadow files? Is it the passwd set?
Are you using the /bin/passwd program to set the password? Have you
tried setting the root password once you have exited from initrd and
are running the full system?
Ted Roth
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|