Red alert: This is a wholly and unapologetically geeky post. Yes, even more so than usual!!
This is one of those things that might never help anyone, but it might. Given that I have encountered random snippets to fix problems on unexpected corners of the Internet, I decided to be magnanimous and share a solution with potential future problem-sufferers, because I’m nice like that!
I recently bought an ASUS rt-56u router. I like it a lot. It gives me gigabit wired and wireless-n, as well as two USB ports to which I can connect either storage or even printer/scanner type peripherals. The reason I did this was in preparation for my acquisition of a Macbook Air – I didn’t want to clog up a quarter or more of the storage on the laptop with my iTunes library, so wanted to store it centrally.
So I set it all up, plugged in my gigabyte USB drive in (formatted to NTFS – the router doesn’t support HFS+ plus we have numerous Windows things on our network too). The Mac was happy to see the drive, but wouldn’t write to it – quite a dent in my plans. With some help from a friend and some investigating, I discovered I need to adjust the settings on router – a setting not made available in the web-based router admin in the latest firmware release.
What a headache! This all refers to a router using 188.8.131.52c firmware – as ever, things might change depending on which firmware you have (earlier versions had the option to enable telnet access without hacking!).
First up, you need to gain access to the innards of your router – you can’t enable telnet access from the web-based admin. Well, not by design anyway, if you’re using the latest firmware as I write. But there’s a hack, and you can do it quite easily, to do it you need to make sure you have Firefox installed, and if you don’t already have it install the Firebug extension.
Got all that sorted? Then we can begin…
- Open up your router’s admin page in Firefox, and navigate to the LAN settings under the Advanced section (or click on this link: http://192.168.1.1/Advanced_LAN_Content.asp)
- Right-click (or double-finger tap if you’re Mac gesturing!) on either of the two text boxes on the main screen, and select ‘Inspect Element’
- In the Firebug section that opens, select the option to Edit the html
- Add a new line to the code that says:
<input type=”text” name=”telnetd” value=”1″>
- You’ll note a box appears next to the text box with a 1 already in it, click Apply in the browser window, and it will enable telnet access to your router. Now is perhaps not the best time to remind you that changing the default password might be a good plan!
- Test the connection, use your telnet client of choice and point it to 192.168.1.1 and log in with username admin and whatever your password is. You should be able to access it, if not, then – erm – bugger, sorry!
- Now you are ‘in’ you need to be careful if you’re not au fait with using command line access to Linux systems, or you might break something. The file we need to edit is the configuration file for Samba, the protocol by which the hard drive is shared. My editor of choice is vi, which is a complete clusterfuck to the uninitiated, in fairness.
- Here is an attempt at a very noddy guide to making the changes you need to:
– Type: vi /etc/smb.conf <enter>
– This will open a text editor window displaying the config file
– Use the arrow key to scroll down to where it says ‘use sendfile = yes’
– Press the I key – this puts vi in insert mode
– Press enter to add a new line, and type:
unix extensions = no
– Press ESC to exit Insert mode, then hold shift and press the semi-colon (;) key
– This will bring up a prompt, type wq and enter (this means ‘write quit’)
– Type exit and press <enter> – this disconnects you from the telnet session
- That’s it. If you remount the drive now you should be able to both read and write to the volume – job’s a good ‘un!
The only pitfall with this is the smb.conf file is dynamic, so it gets recreated when the drive is mounted – so you might need to repeat some of the process (the enabling of the telnet daemon on the router should remain – although obviously if you don’t undo this it does pose a potential security risk – albeit no more so than somebody being able to gain access to the web-based administration should your password not be strong enough).
The cleverer solution would be to have some kind of script that auto-runs when you start up that edits the configuration and then mounts the network drive – that’s a bit beyond me but hopefully something that’s in progress by a friend!