PDA

Bekijk de volledige versie : Custom Firmware v1.1.2.8



JOCKYW2001
28-11-2004, 17:54
For all WL-HDD users here's a custom firmware which includes:
* telnet daemon
* nfsv3 daemon
* vsftpd daemon (replaces stupid-ftpd)
* samba 3.0.9 (supports CIFS)
* doesn't poll for the harddisk each 5 seconds

Every feature of the original 1.1.2.8 firmware is in this custom version, also NTFS R/W support

You find the 34MB file 1.1.2.8-custom.zip in:
http://website.wl500g.info/beta/firmware.php?fid=5
(courtesy of Antiloop, thanks once more :) )

Below you find a copy of the accompanying readme.

JockyW



Date: 27 Nov 2004
Created by: JockyW

THIS STUFF IS ONLY FOR WL-HDD2.5 USERS WHO KNOW WHAT THEY ARE DOING!!!
I TAKE NO RESPONSIBILITY FOR ANY DAMAGE

Consult the WL-HDD forum on http://wl500g.info if you need support.
(Since my time is limited I can not offer 24/7 support-:) )

What's it all about
-------------------

This 1.1.2.8 based firmware + files which need to be installed on the built-in harddisk offers TELNET, NFSv3 (kernelspace), VSFTPD 2.0.1, Samba 3.0.9, and busybox 1.0.0. The HDD watchdog is removed and numerous issues found in my previous version 1.1.2.7-custom are solved. I use this custom firmware mainly for streaming from and to my satreceiver (Dbox2).

Prerequisites
-------------

- An Asus WL-HDD2.5 with built-in HDD which contains a shared partition "part1" which can be accessed from your PC with RW access
- I assume the IP of the Asus is 192.168.1.220
- You have these 3 files:
WLHDD_1.1.2.8-JockyW-1.0_en.trx
tmp.rar
conf.tar.gz
- you have an unrar util on your PC (I use winrar)
- if you have my previous custom firmware (1.1.2.7-custom) on your WL-HDD you should also have the original Asus file WLHDD_1.1.2.8_en.trx . You can download from ftp://taiwan.asus.com.tw/pub/ASUS/wireless/WL-HDD/

How to install
--------------

Perform the steps below if you still have the original firmware on your WL-HDD:
1) connect your PC by wire to the WL-HDD
2) boot up your WL-HDD
3) copy the files tmp.rar and conf.tar.gz to the root directory of the part1 share
4) unrar the file tmp.rar to /tmp (!! be careful: the files should be in /tmp *not* in /tmp/tmp !!)
5) open the "backdoor" webpage in your browser: http://192.168.1.220/Main_AdmStatus_Content.asp (username=admin, password=admin)
6) copy the following command to the "System Command" textbox and then click the "Refresh" button:
chmod a+x /tmp/harddisk/part1/tmp/busybox
7) copy the following command to the "System Command" textbox and then click the "Refresh" button:
chmod a+x /tmp/harddisk/part1/tmp/telnetd
8) copy the following command to the "System Command" textbox and then click the "Refresh" button:
ln -s /tmp/harddisk/part1/tmp/busybox /tmp/harddisk/part1/tmp/sh
9) copy the following command to the "System Command" textbox and then click the "Refresh" button:
/tmp/harddisk/part1/tmp/telnetd -d -l /tmp/harddisk/part1/tmp/sh
10) the previous command started the telnet daemon and now you can access it from your PC with: telnet 192.168.1.220
11) on the prompt type:
cd /tmp/harddisk/part1
12) enter the command:
tmp/busybox tar xzvf conf.tar.gz
13) all necessary files are now installed on the harddisk and now you flash the new firmware WLHDD_1.1.2.8-JockyW-1.0_en.trx on your WL-HDD
14) wait until flashing is done and until the Asus has rebooted itself
15) congratulations! you (hopefully) made it :D

Perform the steps below if you have my previous custom firmware (1.1.2.7-custom) on your WL-HDD:
1) connect your PC by wire to the WL-HDD
2) boot up your WL-HDD
3) copy the files tmp.rar and conf.tar.gz to the root directory of the part1 share
4) flash the original Asus firmware WLHDD_1.1.2.8_en.trx on your WL-HDD
Note: if this fails you should reboot the WL-HDD and enter following commands in telnet: 'killall -9 nfsd', 'killall -9 mountd', 'killall -9 portmap' and 'killall -9 vsftpd'. Then flash again.
5) open the "backdoor" webpage in your browser: http://192.168.1.220/Main_AdmStatus_Content.asp (username=admin, password=admin)
6) copy the following command to the "System Command" textbox and then click the "Refresh" button:
rm -rf /tmp/harddisk/part1/tmp/
7) copy the following command to the "System Command" textbox and then click the "Refresh" button:
rm -rf /tmp/harddisk/part1/conf/
8) unrar the file tmp.rar to /tmp (!! be careful: the files should be in /tmp *not* in /tmp/tmp !!)
9) copy the following command to the "System Command" textbox and then click the "Refresh" button:
chmod a+x /tmp/harddisk/part1/tmp/busybox
10) copy the following command to the "System Command" textbox and then click the "Refresh" button:
chmod a+x /tmp/harddisk/part1/tmp/telnetd
11) copy the following command to the "System Command" textbox and then click the "Refresh" button:
ln -s /tmp/harddisk/part1/tmp/busybox /tmp/harddisk/part1/tmp/sh
12) copy the following command to the "System Command" textbox and then click the "Refresh" button:
/tmp/harddisk/part1/tmp/telnetd -d -l /tmp/harddisk/part1/tmp/sh
13) the previous command started the telnet daemon and now you can access it from your PC with: telnet 192.168.1.220
14) on the prompt type:
cd /tmp/harddisk/part1
15) enter the command:
tmp/busybox tar xzvf conf.tar.gz
16) all necessary files are now installed on the harddisk and now you flash the new firmware WLHDD_1.1.2.8-JockyW-1.0_en.trx on your WL-HDD
17) wait until flashing is done and until the Asus has rebooted itself
18) congratulations! you (hopefully) made it :D

How to use
----------

1) you can now telnet directly into your Asus with: telnet 192.168.1.220
2) same for ftp (ftp 192.168.1.220): username = admin , password = admin
3) to use NFS you have to edit the file "exports" which you can do with a Unix compatible texteditor such as ultraedit on Windowz. You find it in the directory /conf/etc on the "part1" share. The absolute pathname is /tmp/harddisk/part1/conf/etc/exports
4) to configure Samba 3.0.9 you can use the Webinterface http://wl-hdd/index.asp (username=admin, password=admin). At startup the file smb.conf is written in /tmp/harddisk/part1/conf/usr/local/samba/lib). You can try to tune Samba by editing this file and then restart Samba with 'smbd -D' and 'nmbd -D'. If you get a better performance please post in the www.chupa.nl forum.
5) to configure the ftp daemon vsftpd 2.0.1 you must edit with a Unix compatible texteditor such as ultraedit on Windowz.
6) the file /tmp/harddisk/part1/conf/etc/resolv.conf contains DNS nameservers (currently set to my router with ip 192.168.1.1). Edit it with a Unix compatible texteditor such as ultraedit on Windowz.

Issues
------
1) After shutting down via telnet ('halt') or by pressing the button 5 seconds my WL-HDD switches on again after ~60 seconds


Credits
-------

Without the help of Oleg and Antiloop of www.chupa.nl things would have taken much longer.
Greetings to petgun and rubberdick who tested the NFS with their dbox satreceivers.

Enjoy!
JockyW

Oleg
28-11-2004, 18:23
JockyW, congratulations to you.

A few words. Please take some time to prepare and publish sources and complete makefile and pathces for recreating work you've done. This is a good thing the opensource world, so everyone will be able to build it from scratch. This will also really help to you to avoid errors, then you're switching to newer versions. This will also help to survive data lost... In short - there are many reasons for that. :)

Besides of that, there is a GPL, which requires providing sources for the publically distributed binaries, otherwise this could cause problems for Antiloop which is hosting this...

JOCKYW2001
28-11-2004, 18:32
JockyW, congratulations to you.

A few words. Please take some time to prepare and publish sources and complete makefile and pathces for recreating work you've done. This is a good thing the opensource world, so everyone will be able to build it from scratch. This will also really help to you to avoid errors, then you're switching to newer versions. This will also help to survive data lost... In short - there are many reasons for that. :)

Besides of that, there is a GPL, which requires providing sources for the publically distributed binaries, otherwise this could cause problems for Antiloop which is hosting this...

Yes of course. I will provide patches and build instructions this week.
Oleg & Antiloop: Thanks again for your wonderful support.

Cheers,
JockyW

hugo
28-11-2004, 20:54
Thanks for the firmware.

I'm happy to see the binary are now directly executable on Oleg's custom firmware.

smbd and nmbd runs correctly, but I cannot finish the setup. I cannot execute the smbpasswd -a administrator from your conf/bin folder, as I get this error.


[admin@wl-hdd lib]$ /tmp/hd/conf/bin/smbpasswd -a administrator
New SMB password:
Retype new SMB password:
build_sam_account: smbpasswd database is corrupt! username administrator with uid 0 is not in unix passwd database!
Failed to initialise SAM_ACCOUNT for user administrator. Does this user exist in the UNIX password database ?
Failed to modify password entry for user administrator
Is I run the one from Oleg's firmware, I can add user, but it seems it doesn't read the user database.

I have a /etc/passwd, a /etc/smbpasswd, a /etc/config/smbpasswd (a copy, just in case).


[admin@wl-hdd lib]$ cat /etc/smbpasswd
# Samba SMB password file
admin:0:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:xxxxxxxxxxx xxxxxxxxxxxx:root:/usr/local/root:/bin/sh
guest:99:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:xxxx xxxxxxxxxxxxxxxxxxxxxx:guest:/:/sbin/nologin
administrator:0:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx :xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:root:/usr/local/root:/bin/sh


It doesn't accept my users in user mode, or doesn't connect in share mode. I'm sure there is a file or a path missing to make it work.

Here is my smb.conf file:

[admin@wl-hdd lib]$ vi smb.conf
workgroup = wg
server string = WLHDD
netbios name = wl-hdd
log file = /
log level = 1
max log size = 5
security = share
guest ok = yes
guest account = root
max connections = 6
username map = /etc/smbusers
smb passwd file = /etc/smbpasswd
encrypt passwords = yes
pam password change = no
obey pam restrictions = no
interfaces = 192.168.1.10/255.255.255.0
dns proxy = no
[part2]
comment = WL-HDD1 part2
path = /tmp/hd2
guest ok = yes
readonly = yes
writeable = yes
directory mode = 0777
create mask = 0777
[part1]
comment = WL-HDD1 part1
path = /tmp/hd
guest ok = yes
readonly = yes
writeable = yes
directory mode = 0777
create mask = 0777

I'm trying either share mode or user mode.

guest = root is out of despair, i'll remove it when it will be ok

running in share mode, i get this error:


[admin@wl-hdd lib]$ /tmp/hd/conf/bin/smbd -i -S
smbd version 3.0.9 started.
Copyright Andrew Tridgell and the Samba Team 1992-2004
User root in passdb, but getpwnam() fails!
User root in passdb, but getpwnam() fails!


in user mode, no user can login (i'm expert on the windows side, so i'm sure I'm trying the right username and password to get my share)
any idea? what is your config?

JOCKYW2001
28-11-2004, 21:22
First off: These Samba binaries expect smb.conf in /tmp/harddisk/part1/conf/usr/local/samba/lib and smbpasswd in /tmp/harddisk/part1/conf/usr/local/samba/private
I configured Samba with --prefix=/tmp/harddisk/part1/conf/usr/local/samba

All binaries are statically linked with glibc so no surprise they work with in Oleg's unified firm.

You can answer most of your questions by starting nmbd and smbd in interactive mode with some reasonable debuglevel and redirecting output to stdout and most important tell where to find your smb.conf for example:



nmbd -i -S -d 5 -s /tmp/harddisk/part1/conf/usr/local/samba/lib/smb.conf
smbd -i -S -d 5 -s /tmp/harddisk/part1/conf/usr/local/samba/lib/smb.conf
smbpasswd -c /xyz/smb.conf


Use the --help option to see all available options

hugo
28-11-2004, 21:56
problem is it cannot find user in passwd file. I have a password file in /etc but I see your full busybox is modifying in .../conf/etc folder. maybe this is the cause? where should be located passwd file in this case? I tryed both without success.

My samba error is the following:


Primary group is 0 and contains 0 supplementary groups
getsmbfilepwent: returning passwd entry for user admin, uid 0
getsmbfilepwent: returning passwd entry for user guest, uid 99
getsmbfilepwent: returning passwd entry for user administrator, uid 0
build_sam_account: smbpasswd database is corrupt! username administrator with uid 0 is not in unix passwd database!
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
check_sam_security: Couldn't find user 'Administrator' in passdb file.
check_ntlm_password: sam authentication for user [Administrator] FAILED with error NT_STATUS_NO_SUCH_USER
check_ntlm_password: Authentication for user [Administrator] -> [Administrator] FAILED with error NT_STATUS_NO_SUCH_USER

JOCKYW2001
28-11-2004, 22:28
problem is it cannot find user in passwd file. I have a password file in /etc but I see your full busybox is modifying in .../conf/etc folder. maybe this is the cause? where should be located passwd file in this case? I tryed both without success.


Ah yes, that's probably it. My busybox is expecting passwd, shadow, group, gshadow in /tmp/harddisk/part1/conf/etc

My 1.1.2.8 based firmware remounts /etc from flash to /tmp/harddisk/part1/conf/etc at boot time

So you should also remount your /etc (mount -o bind /tmp/harddisk/part1/conf/etc /etc)

brubber
28-11-2004, 23:14
If JockyW2001's answer does not solve your problem this may be of some use

From what I recall from a long time ago when configuring samba 3.n.n. on a linux machine is that you need to map your linux users to samba users. The linux user should of course have sufficient privileges.

I guess it's all case sensitive (I noted "administrator" in one of your posts and " Administrator" in another)

Why are all your partitions readonly?
Shouldn't there be "[Global] at the top of your conf file?
Can admin and administrator have the same uid?

Tried mapping user root to samba users? (smbpasswd -a root), then security = share, guest = nobody. Perhaps you will also need to set encrypt passwords = no.

If this doesn't work use testparm to check your config file for any errors or

check out Samba troubleshooting? http://au1.samba.org/samba/docs/man/Samba-HOWTO-Collection/diagnosis.html

or http://au1.samba.org/samba/docs/man/Samba-HOWTO-Collection/FastStart.html for some worked examples.

or read the whole bl..... smb manual

I had very similar probs, but managed to work them out using these man pages, starting with a very minimal config file.

Are you using SWAT? if not would this be possible? Will certainly make config a lot easier for new users.

Styno
29-11-2004, 06:14
JockyW, congratulations on your own custom firmware! *thumbs-up-smiley* This community can use more of this.

Xeryus
29-11-2004, 10:13
Before I flash my WL-HDD with this custom firmware, how do I switch back to the original Asus 1.1.2.8 if needed? Flashing the original firmware file?

JOCKYW2001
29-11-2004, 11:05
Before I flash my WL-HDD with this custom firmware, how do I switch back to the original Asus 1.1.2.8 if needed? Flashing the original firmware file?
Yep

JockyW

hugo
29-11-2004, 19:09
I keep getting this error:


User nobody in passdb, but getpwnam() fails! in smb log.

Also, smbadduser give this:


./smbpasswd -c /tmp/hd/conf/usr/local/samba/lib/smb.conf -a guest
New SMB password:
Retype new SMB password:
build_sam_account: smbpasswd database is corrupt! username guest with uid 99 is not in unix passwd database!
Failed to initialise SAM_ACCOUNT for user guest. Does this user exist in the UNIX password database ?
Failed to modify password entry for user guest

Of course, I have mounted etc from the /conf/etc, and my passwd file has a guest user:


[admin@wl-hdd etc]$ cat passwd
admin:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:0:0:root:/usr/local/root:/bin/sh
nobody:x:99:99:nobody:/:/sbin/nologin
hugo:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:500:500:us ers:/home/hugo:/bin/sh
ftp::501:501:Linux User,,,:/home/ftp:/bin/sh
Administrator:$1$$PARKLi5sT.PXFt/m702ca/:502:502:Linux User,,,:/home/Administrator:/bin/sh
guest:xxxxxxxxxxxxxxxxxxxxx:503:503:Linux User,,,:/home/guest:/bin/sh

I also have this if I try the guest account:


[admin@wl-hdd bin]$ ./smbpasswd -c /tmp/hd/conf/usr/local/samba/lib/smb.conf -a nobody
New SMB password:
Retype new SMB password:
Could not find gest account via getpwnam()! (nobody)
Failed to modify entry for user nobody.
Failed to modify password entry for user nobody

My smb.conf is as simple as possible, but it shouldn't interfere with the adduser.

Do you see what could be missing?

hugo
29-11-2004, 19:40
Maybe the system points to a different passwd file, and busybox points to /etc. This might be why all system calls fails?

brubber
29-11-2004, 20:24
Did you try this??

Map user root to samba users?
smbpasswd -a rootthen security = share, guest = nobody. Perhaps you will also need to set encrypt passwords = no.

hugo
29-11-2004, 20:46
I already tryed it.

This answer:


[admin@wl-hdd bin]$ ./smbpasswd -c /tmp/harddisk/part1/conf/usr/local/samba/lib/smb.conf -a admin
New SMB password:
Retype new SMB password:
build_sam_account: smbpasswd database is corrupt! username admin with uid 0 is not in unix passwd database!
Failed to initialise SAM_ACCOUNT for user admin. Does this user exist in the UNIX password database ?
Failed to modify password entry for user admin
[admin@wl-hdd bin]$ ./smbpasswd -c /tmp/harddisk/part1/conf/usr/local/samba/lib/smb.conf -a root
New SMB password:
Retype new SMB password:
Failed to initialise SAM_ACCOUNT for user root. Does this user exist in the UNIX password database ?
Failed to modify password entry for user root


I have the same result with normal etc, or etc from .../conf/etc


On the other side, the smbpasswd from Oleg's firmware do work on the same user

brubber
29-11-2004, 21:07
You could also try removing the smbpasswd file and then try again. This should work if the smbpasswd is really corrupt

What's the "-c" option for??

hugo
29-11-2004, 21:23
-c option is to specify the path to the config (under JOCKYW2001 advice)

My smbpasswd is recreated at each reboot, so it's not corrupted. I can only add users with Oleg's smbaddusers, not Jocky's

Here is the error for a simple
net view \\wl-hdd
on Windows side:


UNIX token of user 0
Primary group is 0 and contains 0 supplementary groups
getsmbfilepwent: returning passwd entry for user admin, uid 0
getsmbfilepwent: returning passwd entry for user guest, uid 99
getsmbfilepwent: returning passwd entry for user administrator, uid 0
getsmbfilepwent: end of file reached.
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
User nobody in passdb, but getpwnam() fails!
attempting to free (and zero) a server_info structure
check_ntlm_password: guest authentication for user [] FAILED with error NT_STATUS_NO_SUCH_USER
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
push_conn_ctx(0) : conn_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
NT user token: (NULL)
UNIX token of user 0
Primary group is 0 and contains 0 supplementary groups
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
check_ntlm_password: unix authentication for user [] FAILED with error NT_STATUS_LOGON_FAILURE
check_ntlm_password: Authentication for user [] -> [] FAILED with error NT_STATUS_LOGON_FAILURE
attempting to free (and zero) a user_info structure
attempting to free (and zero) a user_info structure
error string = No such file or directory
error packet at smbd/sesssetup.c(887) cmd=115 (SMBsesssetupX) NT_STATUS_LOGON_FAILURE
s

To me the error is in the getpwnam() command. Also, maybe this can be a hint:

error string = No such file or directory
error packet at smbd/sesssetup.c(887)

There must be a link missing, or maybe the samba source need more hacking?

Swat does not run correctly. I can run it from inetd, but it won't answer from port 901
inetd.conf is created, and services has it's 901 definition.

brubber
29-11-2004, 21:33
So how is the new smbpasswd file created?

user add script?

if so shouldn't there be an entry in your smb.conf?

do you have an /etc/samba/smbusers file?

if so, what's in there?

hugo
29-11-2004, 21:42
smbpasswd file is created by Oleg's firmware smbpasswd, not by Jocky's one. That's the problem.

Also, smbuser exist, but I tryed with or without it. Anyway, I don't see with my guest account= nobody where I can make use of this smbusers.

my config was working with samba 1.9. Don't forget I'm using Jocky's binary on Oleg's firmware, so there must be some change involved

JOCKYW2001
29-11-2004, 22:12
smbpasswd file is created by Oleg's firmware smbpasswd, not by Jocky's one. That's the problem.

Also, smbuser exist, but I tryed with or without it. Anyway, I don't see with my guest account= nobody where I can make use of this smbusers.

my config was working with samba 1.9. Don't forget I'm using Jocky's binary on Oleg's firmware, so there must be some change involved
Hugo, please propose a little test which I can carry out on my WL-HDD. Just a little "step-by-step" guide and also post a smb.conf

JockyW

hugo
29-11-2004, 22:24
Here is my smb.conf


[admin@wl-hdd root]$ cat /tmp/harddisk/part1/conf/
usr/local/samba/lib/smb.conf
[global]
workgroup = MIDEARTH
netbios name = wl-hdd
security = share
guest account= nobody
guest ok = yes
encrypt passwords = no

[data]
comment = Data
path = /tmp/hd
read only = Yes
guest ok = Yes

[admin@wl-hdd root]$

It is straightforward
and shouldn't pose any problem. All users have access to /tmp/hd

you can probably make it work using your firmware, without having to provide an account. Once you get it working, can you try flashing oleg's latest firmware for wlhdd (if you have ext3 format) and just mount -o bind the etc folder to your conf/etc.
If it can work this way, then it means I need your FW to create users. maybe you can try anything from share browsing or connecting. You should get my problem in this situation.

Thanks for your help

JOCKYW2001
29-11-2004, 22:31
Okay I will see if I can test this in the next hour. Probably it will have to wait until tomorrow morning.

Here is just something to show how I add users and samba users:


# adduser -h /tmp/harddisk/ -s /bin/sh -G root administrator
adduser: /tmp/harddisk/: File exists
Changing password for administrator
Enter the new password (minimum of 5, maximum of 8 characters)
Please use a combination of upper and lower case letters and numbers.
Enter new password:
Re-enter new password:
Password changed.
#
# smbpasswd -a administrator
New SMB password:
Retype new SMB password:
Added user administrator.
#
# more smbpasswd
admin:0:F0D412BD764FFE81AAD3B435B51404EE:209C6174D A490CAEB422F3FA5A7AE634:[U
]:LCT-419A115D:
nobody:99:AAD3B435B51404EEAAD3B435B51404EE:31D6CFE 0D16AE931B73C59D7E0C089C0:[U
]:LCT-419A2A53:


The weird thing is that I don't see 'administrator' in smbpasswd :confused:

[edit]
Found administrator password in /etc/shadow


# more /etc/shadow
ftp:x:50:50:FTP User:/tmp/harddisk/:/sbin/nologin
root:$1$$rfWvn1y7kYtNY4MuebTVo1:0:0:root:/:/bin/sh
nobody:x:99:99:nobody:/:/sbin/nologin
admin:$1$$CoERg7ynjYLsj2j4glJ34.:500:500:Linux User,,,:/tmp/harddisk/:/bin/sh
administrator:$1$$rfWvn1y7kYtNY4MuebTVo1:12751:0:9 9999:7:::

hugo
30-11-2004, 10:47
The adduser part works

but the smbpasswd give the same error. It looks it cannot link to the system user database.
User administrator exist. It is created just before.


[admin@wl-hdd bin]$ ./smbpasswd administrator
New SMB password:
Retype new SMB password:
build_sam_account: smbpasswd database is corrupt! username administrator with uid 0 is not in unix passwd database!
Failed to find entry for user administrator.
Failed to modify password entry for user administrator


another example:


[admin@wl-hdd bin]$ ./adduser -h /tmp/hd -s /bin/sh -G root jocky
adduser: /tmp/hd: File exists
Changing password for jocky
Enter the new password (minimum of 5, maximum of 8 characters)
Please use a combination of upper and lower case letters and numbers.
Enter new password:
Bad password: too simple.

Warning: weak password (continuing).
Re-enter new password:
Password changed.
[admin@wl-hdd bin]$ ./smbpasswd -a jocky
New SMB password:
Retype new SMB password:
Failed to initialise SAM_ACCOUNT for user jocky. Does this user exist in the UNIX password database ?
Failed to modify password entry for user jocky


Some other example: User jocky can login:

[admin@wl-hdd bin]$ login jocky
Password:
[jocky@wl-hdd hd]$ cd bin
[jocky@wl-hdd bin]$ ./smbpasswd -a jocky
-sh: ./smbpasswd: Permission denied
[jocky@wl-hdd bin]$ exit
[admin@wl-hdd bin]$ ./smbpasswd -a admin
New SMB password:
Retype new SMB password:
build_sam_account: smbpasswd database is corrupt! username admin with uid 0 is not in unix passwd database!
Failed to initialise SAM_ACCOUNT for user admin. Does this user exist in the UNIX password database ?
Failed to modify password entry for user admin

JOCKYW2001
30-11-2004, 12:03
Hugo, perhaps your problem can be solved by relaxing the file permissions somewhat. Login as root, change to the hdd root dir and 'chmod -R 777 *'

PS: I'm not a Samba specialist either and I still wonder why user 'administrator' is not shown in smbpasswd in in my previous posting :confused:

hugo
30-11-2004, 12:34
I'm sure my permission are ok. It must be the kernel. I'm going to try tonight with your FW, and it will probably be ok. Then I'll try to switch back to Oleg's one and see how it goes.

For info, using vsftpd gives me also an error 500, cannot find user ftp. Of course, user ftp do exist in passwd. As this is your default vsftpd config file and that my setup was the same under your .7 version, it must be something about system calls for users, not really samba

JOCKYW2001
30-11-2004, 13:15
I'm sure my permission are ok. It must be the kernel. I'm going to try tonight with your FW, and it will probably be ok. Then I'll try to switch back to Oleg's one and see how it goes.

For info, using vsftpd gives me also an error 500, cannot find user ftp. Of course, user ftp do exist in passwd. As this is your default vsftpd config file and that my setup was the same under your .7 version, it must be something about system calls for users, not really samba
Hmm, I can remember that I had similar problems in the pas weeks. One thing I had to do was to reconfigure /etc/ld.so.conf (adding /tmp/.../usr/lib) and recreate /etc/ld.so.cache

You find ldconfig in /tmp/.../conf/bin
After recreating ld.so.conf and ld.so.cache you probably have to put them in the original /etc and in the mounted /etc

I'm pretty sure that this might solve your issues.

hugo
30-11-2004, 15:26
Thats it

Thanks a lot. The ldconfig did the trick. I'm going to test speed tonight :)

hugo
30-11-2004, 16:42
Thinks are smoother. Not too much faster, but faster anyway. My divx now play smoothly on my old pocket pc. I'm sure it will perform like a charm on newer ones.

Also, this give a new option to use Oleg's firmware with your conf file, so you get best of both world (except nfs I guess as it is not in kernel support, but a quick config change my solve this)

I'll post a how-to to thank you for this later this week.

JOCKYW2001
01-12-2004, 10:11
I have made an update to the custom firmware last night. It now allows NFS blocksizes up to 32768 bytes ('rsize' and 'wsize'). This quite dramatically improves NFS performance.

Those who already downloaded the 34MB package (1.1.2.8-custom.zip) only have to download the new firmware file here:
http://website.wl500g.info/beta/firmware.php?fid=5

JockyW

didier
06-12-2004, 13:06
Hi, good job !
Sorry to disturb you but do you known when you will release your source code ?
I want to install a speedtouch USB ADSL modem, for this I need compile the kernel.
I have free time, may I help you ?

JOCKYW2001
07-12-2004, 14:20
I will do this soon!

JockyW

Fox_Green
07-02-2005, 17:57
I canīt use 1.1.2.8 on XP.

The Update work fine but there is a problem...

I use the Asus device discovery to connect with the WL.
If i use the Link: "Share" i canīt get any connection with the drive.

The custom 1.1.2.7 hasnīt the problem.

Can you help me out?

FoxG

Sorry for my english.

shcshc
09-02-2005, 18:49
kann anybody tell me his settings for the ASUS HDD and the DBOX2 ?
I want to stream whith the ASUS HDD.
thanks

genious
11-02-2005, 14:51
I canīt use 1.1.2.8 on XP.

The Update work fine but there is a problem...

I use the Asus device discovery to connect with the WL.
If i use the Link: "Share" i canīt get any connection with the drive.

The custom 1.1.2.7 hasnīt the problem.

Can you help me out?

FoxG

Sorry for my english.

I have the same problem. With the original firmware it is no problem to map a network drive on the WL-HDD ("\\192.168.1.220\part1" for example).
With the Custom firmware it donīt work. I tried a lot but no chance. Has this something to do with the Samba thing which is discussed in this thread to? Iīm not so much into this Linux thing.
So has somebody an idea how to make the custim firmware to run under XP as usual (Original firmware)? Thx

Fox_Green
11-02-2005, 15:36
Everybody has different settings.
My settings wouldnīt help you.

What have you done so far?

FoxG

mcfly.587
03-03-2005, 21:01
Hi everybody,

A small question, is it possible to run a webserver on this firmware ??? with a small script ?

Thx for your answer ;)

fleppuhstein
07-04-2005, 20:30
I also have a little question. Ik tried to add a user descibed in the topic of the custom 1.1.27, but there is no busybox.new only a busybox.oleg.

And i had some write problems, couldn't write anything. So I did Chmod 777 part1. But now everyone can read/write my harddisk.

Third and last question, how can you disbale anonymous login on VSFTPD (As in Custom 1.1.2.8)?

frankd
22-04-2005, 11:32
For all WL-HDD users here's a custom firmware which includes:
* telnet daemon
* nfsv3 daemon
* vsftpd daemon (replaces stupid-ftpd)
* samba 3.0.9 (supports CIFS)
* doesn't poll for the harddisk each 5 seconds

Every feature of the original 1.1.2.8 firmware is in this custom version, also NTFS R/W support

Prerequisites
-------------

- An Asus WL-HDD2.5 with built-in HDD which contains a shared partition "part1" which can be accessed from your PC with RW access
- I assume the IP of the Asus is 192.168.1.220
- You have these 3 files:
WLHDD_1.1.2.8-JockyW-1.0_en.trx
tmp.rar
conf.tar.gz

You find the 34MB file 1.1.2.8-custom.zip in:
http://website.wl500g.info/beta/firmware.php?fid=5
(courtesy of Antiloop, thanks once more :) )


Hi All,

I'm searching for the download of the custom firmware, to install
at least telnet and vsftpd.

The link however does not work (somewhere I read: "Too much traffic for big files" ).

Can anybody point me at an alternative download location for those files?

Thanks in advance, Frank

Update: found WL-HDD-1.1.2.7-custom.zip.
This file does countain tmp.rar and conf.tar.gz.
Hopefully, these are the same as those in 1.1.2.8, are they? :confused:

I will use probably Asus standard fw 1.2.3.4, and apply the patches above to is, as per another post in the forum.

Antiloop
22-04-2005, 18:34
Hi All,

I'm searching for the download of the custom firmware, to install
at least telnet and vsftpd.

The link however does not work (somewhere I read: "Too much traffic for big files" ).

Can anybody point me at an alternative download location for those files?

Thanks in advance, Frank

Update: found WL-HDD-1.1.2.7-custom.zip.
This file does countain tmp.rar and conf.tar.gz.
Hopefully, these are the same as those in 1.1.2.8, are they? :confused:

I will use probably Asus standard fw 1.2.3.4, and apply the patches above to is, as per another post in the forum.


Please try again at: http://website.wl500g.info/beta/firmware.php?fid=5
didn't know it was linked as a directory

frankd
25-04-2005, 14:23
Please try again at: http://website.wl500g.info/beta/firmware.php?fid=5
didn't know it was linked as a directory

Thanks, Antiloop, I got it.

Still one question remains:

I want to install the conf.tar.gz stuff to operate under ASUS firmware 1.2.3.4.

In this case, is it still necessary to install 1.1.2.8 before that?
And, if so, why?

JOCKYW2001
25-04-2005, 19:01
Still one question remains:

I want to install the conf.tar.gz stuff to operate under ASUS firmware 1.2.3.4.

In this case, is it still necessary to install 1.1.2.8 before that?

No, shouldn't be necessary. You can't run kernel mode nfsd tho!

/JockyW

Magus
27-04-2005, 21:33
Hello,

A few days ago I flashed WL-HDD with Jocky's Custom Firmware 1.1.2.8.
Installation went without any problems.
1 KB cluster size is great!
Imagine that in original firmware I had 1 MB cluster size!!! :D
With some pain I managed to use newer Samba client included in this firmware :)
However, too much manual work need to be done at every reboot to make it run like I want.

I came across various issues. Here I list them all:

1) After flashing, the "power" diode keeps blinking every second, and "status page" on www page shows "file system inconsistency". I tried to use built-in web disk tool to check it, but the diode stays the same. Flashing it again, turning it off and on didn't help. However device seems to run ok.
Is it some serious error? or should I start getting accustomed to it?

2) Telnetd accepts all connections and does not ask for passwords! :confused: Moreover, it gives "root" access for everyone connecting. I changed password for "root" user but it didn't change anything. With no asking for password it still leaves the gates open to everyone.
Is it possible to configure it to ask for passwords?
I looked at /etc dir and didn't find anything useful to control its behaviour.

3) smb.conf is recreated at every reboot... So after reboot any changes to smb.conf file are lost and I need to telnet to WL-HDD again, kill nmbd and smbd and run them as deamon from commandline with my custom smbxxx.conf. To keep setting alive even after reboot I've tried a suggested solution in which symbolic links are used to run script launching renamed smbd and nmbd with custom smbxxx.conf but that method does not work. It seems that SH(shell) is one of the last processes to run at every boot. I also tried adding scripts to rc.d but none of them was run at boot.
How can I keep settings unchanged at reboot or force smbd/nmbd to use my custom smbxxx.conf?
Is it possible with this firmware to add custom scripts that are to be run at boottime?

Regards,
Magus

Magus
29-04-2005, 16:35
Hello again,

Today I tested DHCP with Jocky's firmware and I'd like to share with you what results I got.
To begin, let me tell you what preliminary changes I made today to my WL-HDD setup.
Following one quite "drastical" solution posted on this site I hex-edited :D "smbd" and "nmbd", so now they use my custom made "sm1.conf" instead of "smb.conf" (which is always rewritten at boot-time).
I also noticed that /tmp/etc/config/smbpasswd file gets rewritten at boot, probably with settings taken from (Storage Setting/Shared Nodes) web page. After loggin in via telnet, I created a few users with "adduser" and samba-users with "smbpasswd" command. Then I copied /tmp/etc/config/smbpasswd to /tmp/harddisk/part1/ and edited sm1.conf so that line "smb passwd file" points at my new smbpasswd file location. As an add-on I added "interfaces = br0" and "bind interfaces only = true" to allow samba work with IP that is changed from time to time.
Now I have a usable set-up and can manage users and directory/file permissions directly from telnet session without worrying about something being recreated at boot-time and spoiling my setup.

Now I move to the main part of my message.
All works ok with Static IP but it's getting broken with DHCP setup (that is when DHCP is turned on in "IP Config" web page).
With DHCP turned on, my WL-HDD gets IP correctly, I can ping it and web-manage it. But it refuses connections on Telnet port and Samba is not working. I've checked by PS command from backdoor web page that "telnetd" and "smbd/nmbd" are not loaded!!!
Instead there can be seen many processes named "killall".. :rolleyes:
In fact "telnetd", "smbd", "nmbd" are loaded for a short while (a few seconds) because I checked the samba logs and they looked 100% correct. I also connected via telnet after restart. Well, after a 2 seconds I was kicked out...
Yes, something KILLS smbd, nmbd and telnetd after a short while. Some kind of DHCP revenge?? haha :p

Seeing all of that I tried running "telnetd" from backdoor page and suprisingly it launched off. I logged in. I noticed something changed here.
Colors in telnet terminal disappeared and when listing directories, instead of names like "admin" "rood", there were shown only numerical identifiers (IDs? GIDs?). Not a big deal I thought and launched "smbd" and "nmbd".
Now, I checked "net view \\[my WL-HDD ip]" from WinXP box and got "Access denied". Then I tried mapping a share. I got "system error 1326, wrong password or user name"...
Checked Samba logs. Samba logs show that smbd was correctly binded to interface with DHCP assigned IP address.
I tried to map a share as guest , then as a user (with password). In each case I got the same reply (wrong pass or username) and in samba log:

"build_sam_account: smbpasswd database is corrupt! username nobody with uid 99 is not in unix passwd database!"
User nobody in passdb, but getpwnam() fails!
auth/auth.c:check_ntlm_password(310)
check_ntlm_password: Authentication for user [] -> [] FAILED with error NT_STATUS_NO_SUCH_USER"

Of course there is a user "nobody" in passwd database. And nothing is corrupt. I checked it a few times. Very strange.

When I changed to static IP... all of my problems disappeared !!
I may be wrong but probably Jocky's firmware, in its current verision, is not meant to be used with DHCP.

So I wonder if anyone tried using this firmware and got Samaba and DHCP working together? ;)