Posted: Mon Jun 28, 2010 7:24 Post subject: My little site for Atheros router/dd-wrt, need suggestion
I made a little site for my WZR-HP-G300NH router. Tutorials including flashing firmware and installing software to setup FTP/Samba/Printer/FTP servers. The software part should apply to most new Atheros routers with external storage.
First thing first, some of the work is taken from this forum so I hope I don't miss any and all proper credits are given to original posters. And any suggestion/feedback are welcome!
So far it going great except for one thing. I have installed opkg and those writeups are excellent, though when installing opkg it complained about not having some files referencing whiterussian (openwrt build) and i just assumed it was ok.
the problem is that i have installed nano and htop (more indepth top application), but every time i try and use them i get: "Error opening terminal: xterm."
Any idea whats going on there? I followed the directions word for word...
as of right now i am stuck trying to start samba. I created the password file and the config file but starting smbd seems to do nothing... I have used samba2 and it 'worked' (minus windows 7 stuff) but thats why i need 3 to work.
it does not appear in any listing as running with htop. copied your config directly and did everything to the word, which by the way Excellent directions.
and clues or suggestions. I saw a rumor that samba3 does not like this or these routers (read: ar71xx) much at all.
I get the same output with
root@DD-WRT root $ smbd -D -i -d 10 -s /opt/etc/samba/smb.conf
talloc report on 'null_context' (total 2170 bytes in 118 blocks)
struct passwd * contains 16 bytes in 1 blocks
struct pdb_methods contains 1321 bytes in 3 blocks
lp_talloc contains 833 bytes in 113 blocks
officially I want to give you a hug. I have spent ooh so many hours trying to get samba2 to work because i saw someone say it could not happen on my router. following your directions I finally have samba installed and windows 7 can finally access it. what a relief.
So, Thank you for the clear directions and detailed writeup.
Few constructive ideas:
explain that you only need 1 partition for the usb drive. the dd-wrt wiki on usb formatting has a process of 4 partitions, /mnt, /jffs, /opt, /swap. (i think) and so i had the drive partitioned before starting yours as i figured it would be similar.
Some of the commands could be explained a little more. I am new to linux and understand only basic commands so something like
So following a restart it seems something decided to not follow over.
root@DD-WRT samba $ smbd -D -i -d 10 -s /opt/etc/samba/smb.conf
talloc report on 'null_context' (total 738 bytes in 106 blocks)
lp_talloc contains 738 bytes in 105 blocks
checked passwd file for missing stuff, which it appears to have all the users, the smbpasswd file was missing some users as it appears that smbpasswd is referencing the file in /etc/samba, not /opt/etc/samba.
any ideas? I have been going through all the setup steps and cannot find anything wrong with my setup right now...
For smbpasswd command, it will create the file at /etc/samba/smbpasswd, thats by default and no way to change it without patching the source code. however, the file can be moved later and an updated smb.conf is required to reflect the change(smb passwd file = /opt/etc/samba/smbpasswd). Also, to create a smaba user with smbpasswd the user must be in /etc/passwd but not necessarily to add all system users, so there is only one entry in smbpasswd file and thats normal. _________________ WZR-HP-G300NH DD-WRT
Guides on Asterisk/Samba/FTP/USB Printer/FTP Server Questions&Feedback
With the latest version release I formatted everything and started from scratch. understanding this more and more i came across something that just does not really make sense to me. the bootup script for samba (there was a ton of stuff in the script but cleared out as directed).
kill -9 $(pidof smbd)
kill -9 $(pidof nmbd)
/usr/sbin/smbd -s /opt/etc/samba/smb.conf
#if you installed samba3 through opkg, use
#/opt/usr/sbin/smbd -s /opt/etc/samba/smb.conf
when i use WinSCP i navigate to those listed directories and could not find smdb in either /usr/sbin or /opt/usr/sbin. i would have changed it but i cannot find smbd after spending a bit with SCP going through the directories. is this right?
Also is nmbd necessary to get name services going to make it all play nice together?
I haven't tried the latest release yet but it was in 14594. You can try "which smbd" or "find / -name smbd" from PuTTY to find smbd. Anyway, if it's missing in the new dd-wrt build then install one from opkg(opkg install samba3).
@uiaa @ccdoggy Thank you guys so much, this tutorial works great!!! I now have a working samba.. the connecting as SHARE is very important, also had the no listing of files in the samba directories with lower case username for some reason.
The all caps part was driving me crazy but it works after doing that. well at least on my wireless laptop, desktop is having issues.
I am wondering if there is a way to specify USB devices more specific and solid then the location '/dev/discs/disc1/part1'?
My problem right now is that i have 2 usb devices connected (soon to be 3 or 4). a 1gig thumb drive and a 1tb hard drive. I tried changing the mount locations to adjust for which is picked up first on boot (designating it disc0 or disc1) but it seems like they are flip flopping every other boot or so. Its not consistent which gets disk0 or disk1. *just spent an hour trying to get it to work but it seems to ALWAYS want to mount my HDD before my flash drive no matter which (disk0 or diso1) i set it to mount on boot. Though the mount point i want for my HDD is /mnt/share/MyBook, which happens to be on the flash drive so the flash needs to mount first.
Also why is it that when i do a 'killall' or 'kill' of a process it does not release its used ram? for example I was messing with samba last night and killed it a handfull of times and it never released the ram to be used by anything else till i rebooted it.
Any way to get nmbd going? i cannot even get a version off the one installed on mine, i figure it would be nice if it easy to get going.
any way to get ahold of that person that reported on the site that they got ushare working? That is the other thing i would truly like to get working on this router.
Sorry for all the questions but i feel like i am soo close to getting this to work exactly how i want it to and most of that is thanks to your help.
@ccdoggy You could probably write a script that uses the hardware ids - forget the real name or how to get it. It looks like a big md5 string that is sometimes found in /etc/fstab and there are tools to help identify which partition to mount.
I now have a samba that comes back up after reboot of the router automatically -- hurray! Only problem is my Windows 7 PC cant seem to ever list files/folders on the share. I use the all capitals method that works on mac but no go on win7, anyone have ideas?