Loading ...
Sorry, an error occurred while loading the content.

Re: [nslu2-linux] Re: Unslung 6.8 default web admin password

Expand Messages
  • Mike (mwester)
    ... Oops! Not much that can be done at this point to put it right. Perhaps you could rescue the files you deleted by copying them from the flash
    Message 1 of 12 , May 2, 2006
    View Source
    • 0 Attachment
      > Unfortunatelly, I chose a rather destructive method of getting...
       
      Oops!   Not much that can be done at this point to put it right.  Perhaps you could "rescue" the files you deleted by copying them from the flash filesystem to the disk, if you recorded what you deleted.
       
      Frankly, though, at this point if I were you, I would copy the data off that disk to somewhere else safe, then reformat that disk to a single partition (like it was when it came from the factory), and start over from the point of reflashing the firmware.  The problem is that putting it together at this point in time is just too difficult -- think of Unslung as somewhat "windows-esque": unlike a completely open Linux system that theoretically could be pieced back together because all the components are known, Unslung has a large component that is proprietary to Linksys -- and we have no way of knowing (short of reverse engineering based on observed behaviour) what sorts of stuff it needs where on which partition.
       
      Sorry to be the bearer of bad news, but c'est la vie.  When the conf partition gets munged, reformatting is currently the only good way to recover.   (That's a challenge, by the way, for someone in the community to take on -- figure out where all the stuff on the "conf" partition comes from, and figure out a way to check it (like fsck, only it would be "linksysfsck") and repair it...)
       
      Mike (mwester)
       
      ----- Original Message -----
      Sent: Monday, May 01, 2006 4:20 PM
      Subject: [nslu2-linux] Re: Unslung 6.8 default web admin password

      Hi Mike,

      After a bit of fiddling around (technical term), I've managed to get
      access to the web interface (with the correct password!), and am able
      to telnet to the box once it's booted with or without a drive
      attached (again with the correct passwords!).

      Unfortunatelly, I chose a rather destructive method of getting to
      this point (deleted lots of files/directories from
      the /share/flash/data directory... Not a good idea, but I must've
      killed the file that was causing my problems, so it's not all bad).

      The down point of this 'technique' is that I've lost my default
      shares 'ADMIN 2' and 'DISK 2'. The files are all still there, but I
      need to re-create the shares. And I don't know how, as the web GUI
      just creates new directories instead of actual shares. I've tried a
      few times, but I cannot access the slug via the network neighbourhood
      icon in Windows like I could before (probably password related,
      although I am using the admin password which I think I've recreated
      properly).

      I can't find anything about re-creating the standard DISK and ADMIN
      shares - any pointers?

      Bamber.


      P.S. Thanks for all the help so far - if only 'professional'
      company's provided support like this!



      --- In nslu2-linux@yahoogroups.com, "Mike \(mwester\)" <mwester@...>
      wrote:
      >
      > Failing to change passwords, along with the other problems you've
      outlined, would be consistent with a not-very-nice problem: it looks
      like the content of part of your disk is not healthy, at least as far
      as Linksys is concerned.
      >
      > Can you check to see if your disk is being mounted properly?  In
      particular, is the /share/flash/conf partition actually mounted, and
      what is the content of the /share/hdd/conf directory?
      >
      > Here's what you should be seeing:
      >
      > IF the disk is plugged into USB Port 2, AND
      >   it IS the only natively-formatted disk on the NSLU2, AND
      >   WAS the only natively-formatted disk on the NSLU2 when
      the "unsling" command was run, AND
      >   WAS in USB Port 2 when the "unsling" command was run, THEN:
      >
      > - your hard disk's "conf" partition should be mounted
      on /share/flash/conf, and
      > - nothing should be mounted on /share/hdd/conf, and
      > - the directory /share/hdd/conf should contain a set of symbolic
      links pointing to files on /share/flash/conf, and
      > - each of those symbolic links should be valid (i.e. point to a
      file that exists), and
      > - /etc/passwd should be a symbolic link to /share/hdd/passwd.
      >
      > Thus, if you follow that twisted trail of logic, /etc/passwd should
      be a symbolic link pointing to a symbolic link pointing to the passwd
      file on the conf partition of the drive plugged into USB Port 2.
      >
      > [*WHEW!*  The wonder is not, as they say, how WELL the bear dances -
      - it's in the fact that the bear dances AT ALL .  We hope fervently
      that Linksys straightens out the disk mounting in the next release,
      so we can get rid of this hack! ]
      >
      >
      > As for the .htpasswd file, that too should be in /share/flash/conf,
      with a symbolic link pointing to it from /share/hdd/conf, but that is
      copied (AFAIK) at boot time by the Linksys firmware into place
      in /home/httpd/...
      >
      > If the "conf" partition is not being mounted at boot (Unslung does
      NOT mount it, it relies upon the Linksys utilities to detect it and
      mount it), then the disk did not pass the Linksys utilities test for
      a valid native disk.  Try mounting it by hand - if you can, and you
      can fsck the partition, then clearly it has a valid filesystem.  Then
      the problem is that Linksys does not like the files or the content of
      the files on that partition.  I don't know how to fix that -- try
      booting up with no disks, then attaching another drive, format it
      natively, then mount that drive's conf partition somewhere and copy
      the files from it to the original's drive, thus replacing the damaged
      contents with a new set (I use this technique to format memory
      sticks, it works).
      >
      > Mike (mwester)
      >   ----- Original Message -----
      >   From: bamber12001
      >   To: nslu2-linux@yahoogroups.com
      >   Sent: Sunday, April 30, 2006 7:41 PM
      >   Subject: [nslu2-linux] Re: Unslung 6.8 default web admin password
      >
      >
      >   Spoke too soon - when I rebooted the slug to get it to load from
      the
      >   hard drive, it had forgotten ALL of the changed passwords.
      >
      >   I think something must have changed in 6.8, as the technique for
      >   resetting the password in the GUI doesn't seem to work at all
      >   (constantly get the Error: Invalid password message).
      >
      >   How do I proceed without totally formatting this disk?
      >
    • Gary
      photo photo2 photo3
      Message 2 of 12 , May 3, 2006
      View Source
      • 0 Attachment
                  
                 photo                                photo2                            photo3
      • alansliu
        Hi Mike (and everyone), I m having exactly the same problem, so this may be a generic danger when doing an in-place 5.5 to 6.8 upgrade. I followed the
        Message 3 of 12 , Aug 6, 2006
        View Source
        • 0 Attachment
          Hi Mike (and everyone),

          I'm having exactly the same problem, so this may be a generic danger
          when doing an in-place 5.5 to 6.8 upgrade. I followed the procedures
          from the wiki and the readme.

          If I could, I would copy the contents of the public/ directory off to
          another drive and start over, but I can't access that share. It
          doesn't appear to be an authentication error. I get some kind of
          resource can't be found error.

          I tried reseting the user password for admin, but got an invalid
          username/password error (just as Bamber reported). I was using
          admin/uNSLUng, after doing an unsling setting the password explicitly
          to uNSLUng.

          I did numerous iterations of copying passwd files with known passwords
          over ones with apparently unknown passwords, and the same with
          .htpasswd files, but nothing works.

          At one point I got a weird listing from "ls -l":

          ---x-wx--T 1 root root 20 Aug 6 08:50
          /home/httpd/html/Management/.htpasswd

          I don't know what the "T" means or why the file doesn't have the usual
          644 permission flags. I erased the file and replaced it with a valid
          .htpasswd file -- still no luck.

          Mike, you state:
          - your hard disk's "conf" partition should be mounted on
          /share/flash/conf, and
          - nothing should be mounted on /share/hdd/conf, and
          - the directory /share/hdd/conf should contain a set of symbolic links
          pointing to files on /share/flash/conf, and
          - each of those symbolic links should be valid (i.e. point to a file
          that exists), and
          - /etc/passwd should be a symbolic link to /share/hdd/passwd.


          I don't see that. I see:

          # mount
          /dev/mtdblock4 on / type jffs2 (rw)
          /proc on /proc type proc (rw)
          usbdevfs on /proc/bus/usb type usbdevfs (rw)
          /dev/mtdblock4 on /dev.state type jffs2 (rw)
          ramfs on /dev type ramfs (rw)
          /dev/mtdblock4 on /var.state type jffs2 (rw)
          ramfs on /var type ramfs (rw)
          none on /tmp type ramfs (rw)
          /dev/sda1 on /share/flash/data type ext3 (rw)
          /dev/sda2 on /share/flash/conf type ext3 (rw,sync)

          # ls -al /share/hdd/conf
          drwxrwxr-x 1 root root 0 Dec 31 1969 .
          drwxrwxr-x 1 admin everyone 0 Dec 31 1969 ..

          Maybe this is the source of the problem. I also notice that the weird
          "T" flag .htpasswd file has appeared again.

          # find / -name .htpasswd
          /usr/local/.htpasswd
          /home/httpd/html/Management/.htpasswd
          find: /proc/9/fd: No such file or directory
          /share/flash/data/public/unslung55/usr/local/.htpasswd
          /share/flash/data/usr/local/.htpasswd
          /share/flash/data/home/httpd/html/Management/.htpasswd
          /share/flash/data/share/hdd/conf/.htpasswd
          /share/flash/conf/.htpasswd

          # ls -al /home/httpd/html/Management
          drwxrwxr-x 1 root root 0 Dec 31 1969 .
          drwxrwxr-x 1 root root 0 Dec 31 1969 ..
          ---x-wx--T 1 root root 20 Aug 6 10:14 .htpasswd
          -rw-r--r-- 1 root root 1370 Dec 31 1969 Button_20P.JPG
          ...(other entries)...

          At this point, I just want to get my public/ share files out again, so
          I can wipe the slate clean and start over. Any thoughts?

          Alan

          --- In nslu2-linux@yahoogroups.com, "Mike \(mwester\)" <mwester@...>
          wrote:
          >
          > > Unfortunatelly, I chose a rather destructive method of getting...
          >
          > Oops! Not much that can be done at this point to put it right.
          Perhaps you could "rescue" the files you deleted by copying them from
          the flash filesystem to the disk, if you recorded what you deleted.
          >
          > Frankly, though, at this point if I were you, I would copy the data
          off that disk to somewhere else safe, then reformat that disk to a
          single partition (like it was when it came from the factory), and
          start over from the point of reflashing the firmware. The problem is
          that putting it together at this point in time is just too difficult
          -- think of Unslung as somewhat "windows-esque": unlike a completely
          open Linux system that theoretically could be pieced back together
          because all the components are known, Unslung has a large component
          that is proprietary to Linksys -- and we have no way of knowing (short
          of reverse engineering based on observed behaviour) what sorts of
          stuff it needs where on which partition.
          >
          > Sorry to be the bearer of bad news, but c'est la vie. When the conf
          partition gets munged, reformatting is currently the only good way to
          recover. (That's a challenge, by the way, for someone in the
          community to take on -- figure out where all the stuff on the "conf"
          partition comes from, and figure out a way to check it (like fsck,
          only it would be "linksysfsck") and repair it...)
          >
          > Mike (mwester)
          >
          > ----- Original Message -----
          > From: bamber12001
          > To: nslu2-linux@yahoogroups.com
          > Sent: Monday, May 01, 2006 4:20 PM
          > Subject: [nslu2-linux] Re: Unslung 6.8 default web admin password
          >
          >
          > Hi Mike,
          >
          > After a bit of fiddling around (technical term), I've managed to get
          > access to the web interface (with the correct password!), and am able
          > to telnet to the box once it's booted with or without a drive
          > attached (again with the correct passwords!).
          >
          > Unfortunatelly, I chose a rather destructive method of getting to
          > this point (deleted lots of files/directories from
          > the /share/flash/data directory... Not a good idea, but I must've
          > killed the file that was causing my problems, so it's not all bad).
          >
          > The down point of this 'technique' is that I've lost my default
          > shares 'ADMIN 2' and 'DISK 2'. The files are all still there, but I
          > need to re-create the shares. And I don't know how, as the web GUI
          > just creates new directories instead of actual shares. I've tried a
          > few times, but I cannot access the slug via the network neighbourhood
          > icon in Windows like I could before (probably password related,
          > although I am using the admin password which I think I've recreated
          > properly).
          >
          > I can't find anything about re-creating the standard DISK and ADMIN
          > shares - any pointers?
          >
          > Bamber.
          >
          >
          > P.S. Thanks for all the help so far - if only 'professional'
          > company's provided support like this!
          >
          >
          >
          > --- In nslu2-linux@yahoogroups.com, "Mike \(mwester\)" <mwester@>
          > wrote:
          > >
          > > Failing to change passwords, along with the other problems you've
          > outlined, would be consistent with a not-very-nice problem: it looks
          > like the content of part of your disk is not healthy, at least as far
          > as Linksys is concerned.
          > >
          > > Can you check to see if your disk is being mounted properly? In
          > particular, is the /share/flash/conf partition actually mounted, and
          > what is the content of the /share/hdd/conf directory?
          > >
          > > Here's what you should be seeing:
          > >
          > > IF the disk is plugged into USB Port 2, AND
          > > it IS the only natively-formatted disk on the NSLU2, AND
          > > WAS the only natively-formatted disk on the NSLU2 when
          > the "unsling" command was run, AND
          > > WAS in USB Port 2 when the "unsling" command was run, THEN:
          > >
          > > - your hard disk's "conf" partition should be mounted
          > on /share/flash/conf, and
          > > - nothing should be mounted on /share/hdd/conf, and
          > > - the directory /share/hdd/conf should contain a set of symbolic
          > links pointing to files on /share/flash/conf, and
          > > - each of those symbolic links should be valid (i.e. point to a
          > file that exists), and
          > > - /etc/passwd should be a symbolic link to /share/hdd/passwd.
          > >
          > > Thus, if you follow that twisted trail of logic, /etc/passwd should
          > be a symbolic link pointing to a symbolic link pointing to the passwd
          > file on the conf partition of the drive plugged into USB Port 2.
          > >
          > > [*WHEW!* The wonder is not, as they say, how WELL the bear dances -
          > - it's in the fact that the bear dances AT ALL . We hope fervently
          > that Linksys straightens out the disk mounting in the next release,
          > so we can get rid of this hack! ]
          > >
          > >
          > > As for the .htpasswd file, that too should be in /share/flash/conf,
          > with a symbolic link pointing to it from /share/hdd/conf, but that is
          > copied (AFAIK) at boot time by the Linksys firmware into place
          > in /home/httpd/...
          > >
          > > If the "conf" partition is not being mounted at boot (Unslung does
          > NOT mount it, it relies upon the Linksys utilities to detect it and
          > mount it), then the disk did not pass the Linksys utilities test for
          > a valid native disk. Try mounting it by hand - if you can, and you
          > can fsck the partition, then clearly it has a valid filesystem. Then
          > the problem is that Linksys does not like the files or the content of
          > the files on that partition. I don't know how to fix that -- try
          > booting up with no disks, then attaching another drive, format it
          > natively, then mount that drive's conf partition somewhere and copy
          > the files from it to the original's drive, thus replacing the damaged
          > contents with a new set (I use this technique to format memory
          > sticks, it works).
          > >
          > > Mike (mwester)
          > > ----- Original Message -----
          > > From: bamber12001
          > > To: nslu2-linux@yahoogroups.com
          > > Sent: Sunday, April 30, 2006 7:41 PM
          > > Subject: [nslu2-linux] Re: Unslung 6.8 default web admin password
          > >
          > >
          > > Spoke too soon - when I rebooted the slug to get it to load from
          > the
          > > hard drive, it had forgotten ALL of the changed passwords.
          > >
          > > I think something must have changed in 6.8, as the technique for
          > > resetting the password in the GUI doesn't seem to work at all
          > > (constantly get the Error: Invalid password message).
          > >
          > > How do I proceed without totally formatting this disk?
          > >
          >
        • Marcel Nijenhof
          ... You still use the internal flash as root system. Could you check if you see a file /.sda1root and that there is no file /.sdb1root . -- Marceln
          Message 4 of 12 , Aug 7, 2006
          View Source
          • 0 Attachment
            On Mon, 2006-08-07 at 00:27 +0000, alansliu wrote:
            > I don't see that. I see:
            >
            > # mount
            > /dev/mtdblock4 on / type jffs2 (rw)

            You still use the internal flash as root system.

            Could you check if you see a file "/.sda1root" and
            that there is no file "/.sdb1root".

            --
            Marceln
          Your message has been successfully submitted and would be delivered to recipients shortly.