![]() |
Becoming Root
I was just reading the guide to becoming root from maemo web site. Is it possible to become root without flashing to enable rd mode. I mean, cant i just use x term to copy the /usr/sbin/gainroot to /media/mmc1 and then modify it and recopy it back.
|
You need root privileges to do the copy, so nope. You need to flash it. But flashing to rd doesn't mean that your system get's wiped out. It only triggers the system to rd mode. So, it's safe to do at any time. You just need a linux distro to do it. If you already don't have one, I recommend downloading knoppix or similiar rebooting with the cd to linux, download flasher to desktop and then follow instructions on how to enable rd mode. It's really 5 mins tops. Highly recommended!
|
it let me copy the gainroot but i havent tried to recopy it back. also can you help me clarify what to comment out. here is what my gainroot looks like.
#! /bin/sh -e trap exit SIGHUP SIGINT SIGTERM PATH=bin:/bin/usr/bin:/sbin:/usr/sbin MODE='/usr/sbin/chroot mnt/initfs cal-tool --get-rd-mode if [ x$MODE = enabled ] then echo "Root enabled" /bin/sh else echo "Enabled RD mode if you want to break your device" fi How do you do the alternative and modify etc/sudoers |
If you're not comfortable editing files: DON'T! Leave it enabled in R&D mode, or switch to and from when you require it.
Commenting lines out of /usr/sbin/gainroot is much more "dangerous" (in terms of leading to a complete reflash) than anything else, IMHO. To repeat: if you need to ask "can you help me clarify what to comment out"[1] then leave it alone! HTH, Andrew [1] I'm not saying you shouldn't be helped to learn how to get around in Linux, or learn shell scripting - but /usr/sbin/gainroot is entirely the wrong file to be playing with. |
Quote:
I just went through the process of modifying gainroot the other day and I'd offer that the instructions are pretty vague on the point c_legaspi is asking about. Having just gone through this whole ordeal recently (successfully, as far as I can tell), I was going to provide an answer that I thought would help clarify the instructions and explain the theory behind which lines to comment out to the extent I understand that theory (which isn't very deeply). Can you explain your warning any futher or are you just reiterating the warnings provided with the instructions? I'd be honestly surprised if anyone read the already existing warnings and thought that these modifications presented no risk. |
Well, there have been a number of people who've edited it wrongly and lost the ability to become root full-stop, and had to reflash.
Also, I've not yet seen a clear reason why R&D mode should be disabled anyway. Leave it enabled, unless you don't like spanners & green text when booting. 50p (about 92 cents) to anyone who can convince me why R&D mode should be disabled; after editing /usr/sbin/gainroot to disable the R&D check. |
I agree with aflegg. I put it to rd mode and it's been running on it ever since. Flashing the latest version has no effect on the rd mode, so if you rd mode enabled on the 2005 version, when you install 2006, it will retain it in rd mode.
|
i am unsure and thats why im asking. i would like to have root access without having to go thru the reflashing all the time. which lines do i comment out. the maemo instructions are unclear to me
if this is dangerous, then give an alternative solutions. |
Quote:
|
thanks, at least it will give me some kind of ideal. Yeah, leaving it in RD is another option. just want to weigh all my options
|
All times are GMT. The time now is 15:36. |
vBulletin® Version 3.8.8