cannot login after power outage, smb shares don´t work

460 views
Skip to first unread message

rafaelr

unread,
May 30, 2012, 3:01:03 PM5/30/12
to al...@googlegroups.com
hi,

i had a power outage this afternoon, so i just switched the dns323 (running alt-f 0.1b7) back on.
when i checked the alt-f home page it did a fsck automatically (think it was due). problem now is that after the check was done i can´t do anything but look at the status page.
when i try to get to another page the alt-f login page comes up but my password won´t work anymore.
i also can´t access the smb share from windows, won´t accept my login there either.

what can i do? any help would be appreciated!

Joao Cardoso (Alt-F)

unread,
May 30, 2012, 4:49:59 PM5/30/12
to al...@googlegroups.com
You have flashed Alt-F, right? I will assume an "yes" in the following.

-Try a clean reboot first, read the AboutLedsAndButtons wiki entry. For your
convenience:

1. Three seconds after you start pressing the box front button, the right
amber led starts flashing, and if you release the button the box will do a
controlled reboot, but first will execute the script that you specified in the
"Front button 1st cmd entry". (configure it using Services->System->sysctrl-
>Configure)

Being a clean shutdown the fsck step on reboot shouldn't happen (unless it
failed the first time, did you notice in the status page if the filesystems
was mounted RW (Read/Write)or RO (Read Only) after the fsck ?)

-If that doesn't work, telnet or ssh the box as user 'root' and using the same
password as the web gui. If it works, execute the command

rm /etc/web-secret

and login the webgui again (a new password will be asked for)

-If that still doesn't work, you can try the recovery method. Again an excerpt
from the AboutButtonsAndLeds wiki:

The back button also has two recovery actions if the "Enable Recovery"
checkbox in Services->System->sysctrl->Configure is checked:

4.1 If you keep the back button pressed for more than ten seconds, you can
telnet the box at port 26, as root and without password. This is a safeguard
in case you forget the password.

4.2 As a last safeguard, if you press the back button for more that twenty
seconds, all the settings saved in flash will be erased, and the box will do a
controlled reboot. This is a last resort safeguard, in case you mess the box
configuration so much that you can't do anything with it; after the reboot the
box will behave as if no settings has ever been saved, and you have to
struggle to find its IP (if you have a DHCP server enabled in your network,
the box will use it).

For 0.1B6 the amber leds flash twice a second, so its easy to count seconds :)

Worked? Which one?

rafaelr

unread,
May 30, 2012, 6:04:31 PM5/30/12
to al...@googlegroups.com

Thanks for the quick reply!

tried the controlled reboot, which didn´t change anything unfortunately.
i was able to telnet and do that rm /etc/web-secret command.
the webgui did ask for a new password but afterwards i still only get the login page when i try to get to any other settings page.
so i guess it´s recovery time tomorrow.
one more thing, i´m pretty sure i didn´t flash alt-f , but was using it "on-top" of the stock firmware (the dns323 with alt-f had been running very stable for the first couple of weeks, and i kind of just left it running...)
anyways, thanks for taking the time for that detailed reply, i´ll be reporting how the recovery goes (and probably have more questions) tomorrow...

Joao Cardoso

unread,
May 30, 2012, 8:43:22 PM5/30/12
to al...@googlegroups.com


On Wednesday, May 30, 2012 11:04:31 PM UTC+1, rafaelr wrote:

Thanks for the quick reply!

tried the controlled reboot, which didn´t change anything unfortunately.
i was able to telnet and do that rm /etc/web-secret command.
the webgui did ask for a new password but afterwards i still only get the login page when i try to get to any other settings page.

That shouldn't happen!

Ah, you said that you are still on 0.1B7. Then the problem must be the date/time setup not being correct. The session expires one hour after the login being accepted, as compared to your desktop computer date, and If the box date/time is not correctly setup it thinks that is has already expired, prompting for the login again.
This was fixed in RC2 ;-)

To fix the date issue, login as root as you did before, and issue the command

   echo NONE-0 > /etc/TZ

now you should be able to login (and also adjust the timezone/date/time, which has been obliterated)

so i guess it´s recovery time tomorrow.
one more thing, i´m pretty sure i didn´t flash alt-f ,

Ah, but that change things. As Alt-F is booted from disk in this case, you only needed to change permissions or renamed/remove the fun_plug file to be back to the D-Link firmware on the next reboot.
Anyway the above date fix will hopefully fix things.

rafaelr

unread,
May 31, 2012, 4:01:20 PM5/31/12
to al...@googlegroups.com
the time/date reset command worked! thanks alot!
smb shares were not working before because samba server was not running after poweroutage, 'doh :)

one last question: is there anything to be careful about when i update to rc2 from 0.1b7?

Joao Cardoso

unread,
Jun 1, 2012, 9:56:29 AM6/1/12
to al...@googlegroups.com


On Thursday, May 31, 2012 9:01:20 PM UTC+1, rafaelr wrote:
...

one last question: is there anything to be careful about when i update to rc2 from 0.1b7?

Upgrading should be as simple as dropping the new Alt-F tar file aside to your current fun_plug (for which there is no new release).
But I never did it, I don't know if D-Link tar executable will overwrite existing files during extraction; if it does not works, you have to remove first the 'alt-f' (lower case!) folder.

I would recommend to update first to RC1 then to RC2.
There is a script to run when updating B7 to RC1.
Read the announcements and followups.

Joao

anadigi

unread,
Jun 1, 2012, 5:28:11 PM6/1/12
to al...@googlegroups.com
I have upgraded mine from Dlink firmware to RC2 for few months without any problem.  I like it more and thanks Joao! :)
However, I notice the web becomes sluggish after a month unless I turn it off and restart it.
Message has been deleted
Message has been deleted
Message has been deleted

Joao Cardoso

unread,
Aug 22, 2012, 7:52:26 PM8/22/12
to al...@googlegroups.com
For some reason your message does not appears in the forum, I'v received it by e-mail

On Tue, Aug 21, 2012 at 5:59 PM, rafaelr <r.reifel...@gmail.com> wrote:
had another power outage.
this time i can login fine and altf rc2 seems to be running fine as well. samba is running but i can´t connect to any share from windows (haven´t changed anything).


from the logs:
  smbd version 3.5.12 started.
 
Copyright Andrew Tridgell and the Samba Team 1992-2010
[2012/08/21 07:26:00.023226,  1] param/loadparm.c:6912(service_ok)
  NOTE
: Service Backup is flagged unavailable.
[2012/08/21 07:26:00.024747,  0] param/loadparm.c:5883(lp_bool)
  lp_bool
(+BT): value is not boolean!
[2012/08/21 07:26:00.030900,  0] printing/pcap.c:184(pcap_cache_reload)
 
Unable to open printcap file /etc/printcap for read!
[2012/08/21 07:26:28.874647,  0] lib/access.c:413(check_access)
 
Denied connection from Rafael-VAIO.home (10.0.0.6)
[2012/08/21 07:26:28.875699,  1] smbd/process.c:2308(smbd_process)
 
Connection denied from 10.0.0.6

 
> Connection denied from 10.0.0.6

Is 10.0.0.x your network? It looks like that there is a problem in /etc/samba/smb.conf,
in the 'hosts allow'?

Can you post that line, together with the output of the 'ifconfig eth0' command?

My own hosts allow: 'hosts allow = 127. 10.42.43.0/255.255.255.0'
relevant line from my 'ifconfig eth0': 'inet addr:10.42.43.51 Bcast:10.42.43.255 Mask:255.255.255.0'

This says that all computers in my home network can access the samba shares.
This is setup automatically when you use Setup->Host, and, if you are using DHCP, every time
 a new IP is leased by your router.




help?


--
You received this message because you are subscribed to the Google Groups "Alt-F" group.
To post to this group, send email to al...@googlegroups.com.
To unsubscribe from this group, send email to alt-f+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/alt-f/-/fYlR_v86DE0J.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

rafaelr

unread,
Aug 23, 2012, 12:04:04 PM8/23/12
to al...@googlegroups.com
i know something´s weird, i posted the msg 3 times last night because at first it showed up but after 10 minutes or so it said message deleted.


10.0.0.x is my network.
the dns323 has 10.0.0.2 as fixed ip.

from smb.conf:
# cat /etc/samba/smb.conf
[Global]
workgroup
= MUSKETIERE
server
string = DNS-323 NAS

security
= user
encrypt passwords
= yes
smb passwd file
= /etc/samba/smbpasswd
username map
= /etc/samba/smbusers

enable core files
= no
syslog only
= yes
max log size
= 32

hosts allow
= 127. 10.0.0.0/
socket options
= TCP_NODELAY SO_RCVBUF=65536 SO_SNDBUF=65536

printing
= bsd
print command = lpr -P %p %s; rm %s

map to guest
= Bad User
guest account
= nobody
browseable
= yes


and the ifconfig eth0:
inet addr:10.0.0.2  Bcast:10.0.0.255  Mask:255.255.255.0

one more thing:
altf rc2 says settings have changed in the following files and wants me to save settings (even though i haven´t changed a thing and just rebooted the dns323):
etc/network/interfaces
etc/hosts
etc/resolv.conf
etc/samba/smb.conf
etc/httpd.conf

Joao Cardoso

unread,
Aug 23, 2012, 4:17:00 PM8/23/12
to al...@googlegroups.com


On Thursday, August 23, 2012 5:04:04 PM UTC+1, rafaelr wrote:
i know something´s weird, i posted the msg 3 times last night because at first it showed up but after 10 minutes or so it said message deleted.

Yes, but it was not me that deleted them.

10.0.0.x is my network.
the dns323 has 10.0.0.2 as fixed ip.

from smb.conf:
# cat /etc/samba/smb.conf
[Global]
workgroup
= MUSKETIERE
server
string = DNS-323 NAS

security
= user
encrypt passwords
= yes
smb passwd file
= /etc/samba/smbpasswd
username map
= /etc/samba/smbusers

enable core files
= no
syslog only
= yes
max log size
= 32

hosts allow
= 127. 10.0.0.0/

Yes, this is the culprit, "hosts allow" should read 'hosts allow= 127. 10.0.0.0/255.255.255.0'
Set "Static IP", then hit the Submit button in the Setup->Host web page, then watch  smb.conf 'hosts allow' for a correct value.
Then set it again to DHCP, Submit and watch smb.conf again. Fixed?

I remember something related to this being reported before... ah, have you flashed Alt-F  or are you using "reloaded/on-top"?
Read Issue 3, Can't access shares when using "reloaded" in the RC2 announcement

...
 
one more thing:
altf rc2 says settings have changed in the following files and wants me to save settings (even though i haven´t changed a thing and just rebooted the dns323):
etc/network/interfaces
etc/hosts
etc/resolv.conf
etc/samba/smb.conf
etc/httpd.conf

This is "normal" and is fixed for RC3.

The reason is that those files are updated when your router/DHCP server leases another IP to your box; as the network might have changed, those files need to be updated and its time-stamp date changes, which makes the web gui think that you have changed them.

rafaelr

unread,
Aug 24, 2012, 2:56:25 AM8/24/12
to al...@googlegroups.com

Yes, but it was not me that deleted them.

i know, it´s happened to me this week in another group too.

Yes, this is the culprit, "hosts allow" should read 'hosts allow= 127. 10.0.0.0/255.255.255.0'
Set "Static IP", then hit the Submit button in the Setup->Host web page, then watch  smb.conf 'hosts allow' for a correct value.
Then set it again to DHCP, Submit and watch smb.conf again. Fixed?

yes, that fixed it! Thanks!
 
I remember something related to this being reported before... ah, have you flashed Alt-F  or are you using "reloaded/on-top"?
Read Issue 3, Can't access shares when using "reloaded" in the RC2 announcement

you´re right, i´m using alt-f on top of vendor firmware.
 
This is "normal" and is fixed for RC3.

 great, looking forward to RC3!

Thanks again for your help!
 
Reply all
Reply to author
Forward
0 new messages