My little site for Atheros router/dd-wrt, need suggestion

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Goto page 1, 2, 3, 4, 5, 6, 7  Next
Author Message
uiaa
DD-WRT User


Joined: 11 Mar 2010
Posts: 56

PostPosted: Mon Jun 28, 2010 7:24    Post subject: My little site for Atheros router/dd-wrt, need suggestion Reply with quote
Hi
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!

Here is the site:

http://g300nh.blogspot.com/

Thanks!

_________________
WZR-HP-G300NH DD-WRT
Guides on Asterisk/Samba/FTP/USB Printer/FTP Server
Questions&Feedback
Sponsor
ccdoggy
DD-WRT User


Joined: 30 Aug 2009
Posts: 455

PostPosted: Mon Jun 28, 2010 15:50    Post subject: Reply with quote
Thanks for the info. I am using a WNDR3700 and samba2 is being more then a pain so i am going to see if i can get 3 installed with some help from your site.
ccdoggy
DD-WRT User


Joined: 30 Aug 2009
Posts: 455

PostPosted: Tue Jun 29, 2010 1:03    Post subject: Reply with quote
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...
uiaa
DD-WRT User


Joined: 11 Mar 2010
Posts: 56

PostPosted: Tue Jun 29, 2010 1:27    Post subject: Reply with quote
The warning appears only when using dd-wrt's ipkg to install opkg(the initial setup), that's as expected. After that, always use "opkg" and should be a clean run.

About the xterm error, try install libncurses
Code:

opkg install libncurses

then add the following line to ~/.profile
Code:

export TERMINFO=/opt/usr/share/terminfo

logout and login again.

_________________
WZR-HP-G300NH DD-WRT
Guides on Asterisk/Samba/FTP/USB Printer/FTP Server
Questions&Feedback
ccdoggy
DD-WRT User


Joined: 30 Aug 2009
Posts: 455

PostPosted: Tue Jun 29, 2010 2:13    Post subject: Reply with quote
That worked, thanks!

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 added to smb.conf:
log file = /opt/samba.log

but nothing shows in the log.

looks like the same problem as http://www.dd-wrt.com/phpBB2/viewtopic.php?t=70255&postdays=0&postorder=asc&start=0

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
uiaa
DD-WRT User


Joined: 11 Mar 2010
Posts: 56

PostPosted: Tue Jun 29, 2010 3:43    Post subject: Reply with quote
Sorry, thats a mistake as I wrote everything from memory and messed the order of some steps.

The problem is, on the smb.conf

guest account = nobody

so we need to add another user "nobody"

to do so, run
Code:

grep -q nobody /etc/passwd || echo 'nobody:x:65534:65534:nobody:/mnt:/bin/false' >> /etc/passwd

also add this line to the adduser script(see here, step 3)

smbd should work once the "nobody" user is added.

_________________
WZR-HP-G300NH DD-WRT
Guides on Asterisk/Samba/FTP/USB Printer/FTP Server
Questions&Feedback
ccdoggy
DD-WRT User


Joined: 30 Aug 2009
Posts: 455

PostPosted: Tue Jun 29, 2010 5:25    Post subject: Reply with quote
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
Code:
export LD_LIBRARY_PATH='/jffs/lib:/jffs/usr/lib:/lib:/usr/lib'
export PATH='/jffs/bin:/jffs/usr/bin:/jffs/sbin:/jffs/usr/sbin:/bin:/sbin:/usr/sbin:/usr/bin'
ipkg install /jffs/opkg_528-1_ar71xx.ipk #replace the filename accordingly

is a bit confusing, but you dont need to go too in depth into it.

also do you know the samba config setting that allows someone to see the home directory (i think thats what it is called where the user sees the shares) without needing to login?

Truly, Thank you. i am going to share this with the 3700 group. I will have more questions for you later but that is for a little later.
ccdoggy
DD-WRT User


Joined: 30 Aug 2009
Posts: 455

PostPosted: Wed Jun 30, 2010 4:25    Post subject: Reply with quote
So following a restart it seems something decided to not follow over.

Code:
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...

Thanks again.
uiaa
DD-WRT User


Joined: 11 Mar 2010
Posts: 56

PostPosted: Thu Jul 01, 2010 0:27    Post subject: Reply with quote
Sorry i'm clueless here as I see no reason why it wouldn't work after rebooting. Please ensure /etc/passwd file is correct and you can try to recreate the smbpasswd file by running

smbpasswd share share
cp /etc/samba/smbpasswd /opt/etc/samba/smbpasswd

also make sure /etc/samba folder is there.

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
ccdoggy
DD-WRT User


Joined: 30 Aug 2009
Posts: 455

PostPosted: Sat Jul 03, 2010 6:06    Post subject: Reply with quote
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).

Code:
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?

Thanks again!
uiaa
DD-WRT User


Joined: 11 Mar 2010
Posts: 56

PostPosted: Sat Jul 03, 2010 7:38    Post subject: Reply with quote
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).

With nmbd you can access the router by its name("dd-wrt" by default), considering the router will get a static ip most likely, it's safe to turn off nmbd and free some ram.

_________________
WZR-HP-G300NH DD-WRT
Guides on Asterisk/Samba/FTP/USB Printer/FTP Server
Questions&Feedback
netslayer
DD-WRT Novice


Joined: 28 Jun 2010
Posts: 16

PostPosted: Tue Jul 13, 2010 7:48    Post subject: Reply with quote
@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.
ccdoggy
DD-WRT User


Joined: 30 Aug 2009
Posts: 455

PostPosted: Tue Jul 13, 2010 17:22    Post subject: Reply with quote
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.

Any ideas?

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.

Thank you so much for your help.
netslayer
DD-WRT Novice


Joined: 28 Jun 2010
Posts: 16

PostPosted: Thu Jul 15, 2010 4:08    Post subject: Reply with quote
@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.
netslayer
DD-WRT Novice


Joined: 28 Jun 2010
Posts: 16

PostPosted: Thu Jul 15, 2010 4:09    Post subject: Reply with quote
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?
Goto page 1, 2, 3, 4, 5, 6, 7  Next Display posts from previous:    Page 1 of 7
Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum