The every day things from Thalamus' life.

Thalamus' Blog

21 September, 2007

Changed from Linksys to DD-WRT on my AP.

Filed under: ComputerStuff_en — Thalamus @ 17:54

I was meant to flash a new firmware for another guy today. But, he wasn’t able to come to my house today to get it fixed. So, since I’ve downloaded what I needed and noticed that even the linksys original firmware I’ve had was slightly out of date. I decided, lets update my own instead. First, I simply ran the linksys firmware. Checked that it was working. Last time I went from linksys to the Sveasoft Alchemy I had some problems with NBT towards my samba server. So, went back to the linksys firmware because of it. Now, today – I decided it was about time I tried any of those free and cool firmwares out there for the WRT54G/GS. And I have heard many mentioning that the DD-WRT was a really good release. I did not choose the bleeding edge, and instead went for the latest stable version.

I’m the lucky owner of a GS ver. 1.1 – and that is as easy to upgrade as pressing any button on a webpage. Everything went very well and I now have a wealth of options you would have to pay alot of money to get in a professional AP. But, ok – I might be a bit quick writing about how awsome it is. I’ll come back to that later on I guess. But, to be perfectly honest. I do believe it has boosted my the wifi speed abit. Browsing my samba server feels more responsive after the upgrade.

In the next couple of night, I expect myself to be laying in bed reading up on all the possibilities in both the newer version and the new options I have in my “new” AP 🙂

• • •
 

4 September, 2007

scponly on fedora core 6

Filed under: ComputerStuff_en — Thalamus @ 09:58

On several systems I have implemented scponly as a rooted shell in order to make users able to up/download files to a server without being able to use the machine for anything else than that. scponly is what the name states, a chrooted shell that only enables scp or to me more exact scp or sftp.

Today I tried it for the first time on a fedora 6 system (might apply to fedora 7 or even others) – and I ran into a problem I at frist could not figure out.

To debug you can do a “echo 2 > /usr/local/etc/scponly/debuglevel” and that makes scponly starting to chat more into the log files what it is doing. Unfortunatly, it didn’t tell me anything interresting. I then did initiate a connection to the daemon without passing any password. From there I could debug the login procedure by issuing strace to the process number. On the server side, after connecting (before issuing the password) I did a ‘ps -ef | grep sshd’ – from there I searched the pid of the sshd process wich had the [Priv] line attached to it, and issued ‘strace -o /tmp/sftp.log -f -ff -p ‘. I then, issued the password. What happened was that I got 3 log files in my /tmp folder – all with strace-debug information. On the end of the last log I check I found a /dev/null not found message before the server choked. Hmm… what is this – /dev/null does exist … doesn’t it ?

I started hunting google for this problem and came upon the solution. And this is what I found.

cd /home/someuser
mkdir dev
ls -l /dev/null # find the major minor number of the device, you need it in the next command)
mknod dev/null c major minor
chmod 666 dev/null

So, for some reason, on fedora 6 – it looks like the /dev/null needs to be in the users home directory. On all systems I’ve tried before … this has not been the case.

• • •