PDA

Bekijk de volledige versie : Can I give root the bash shell? Savely...?



mumsoft
08-08-2007, 15:10
I have KCFurge's firmware running for months now. Sollie answered lately to one of my questions and suggested to add the TZ (timezone) to /opt/home/root/.profile. So I did, but until then I did not have a home-dir for root, so I created it and changed /etc/passwd accordingly:

root:[password]:0:42000:root:/opt/home/root:/bin/sh
This was running fine and solved the little problem with the system time.

But the prompt was not nice and I concluded this was due to the fact that root was using sh instead of bash. So, again I changed something:

root:[password]:0:42000:root:/opt/home/root:/opt/bin/bash
I logged in as root with telnet and it showed a nice prompt.

Next day I started the router as usual, but it did not reach the Ready status. it rebooted again and again. I switched it off and grumbled.
I did not want to reset or reconfire or reflash, so I took the HD out and figured out where on earth the files were kept. What I found about this secret matter is published here: http://wl500g.info/showthread.php?t=10198

Once I could reach the files I changed __pdc/passwd back. Made it read-only. Copied it to /shares/MYVOLUME1. Put a line in rc.local to copy this one to /etc/passwd.

Now my router booted and reached the Ready status again.

It is up and running now, BUT
BUT I like to know what I did wrong. :confused: To be honest, at first I thought I should give root the correct path to /opt/bin. I changed .profile accordingly before reverting to the old /etc/passwd (because It did not help)
I use UBSA, does that matter?

Marc