maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Troubleshooting (https://talk.maemo.org/forumdisplay.php?f=6)
-   -   gainroot problems (https://talk.maemo.org/showthread.php?t=1528)

maxilogan 2006-03-05 21:25

gainroot problems
 
Hi all. Last week, I tried to enable r&d mode on my 770 and succeeded. Then, tried to modify the gainroot file in order to avoid the r&d mode control but ever since then, always get a "/bin/sh: illegal option -" error when I run the "sudo gainroot" command.

Guess this is due to the fact that I added the comments # using a windows editor; my opinion is that the editor itself converted the original CR charachter contained in the gainroot in CR+LF...

Anyway, bedides what the cause was, is there any way now to recover my system gaining root privileges or do I have to reflash it?? It all works ok but the gainroot command, althogh I am in r&d mode...
I also tried "sudo su -u root" but it wouldn't accept a password (tried "rootme")

Thanks to all!

odyssos 2006-03-07 21:01

Hi there,

I followed Meaemo's intructions to gain root.
I thought it was very simple, since i'm a novice.
But now my 770 doesn't recognize the MMC anymore, and typing "sudo" on the XTerm always gives me back this message:
"parse error in /etc/sudoers near line 21"

Any help? I'm really linux-illiterate...

Thanks
mario.zanusso@gmail.com

aflegg 2006-03-08 09:16

The clue's in the error message: you've done something which has broken the format of /etc/sudoers and now `sudo' can't understand it.

A reflash is almost certainly the only solution.

maxilogan 2006-03-08 10:12

Quote:

Originally Posted by aflegg
The clue's in the error message: you've done something which has broken the format of /etc/sudoers and now `sudo' can't understand it.

A reflash is almost certainly the only solution.

By the way, I also solved by reflashing mine and folloing again the instructions on how to become root. No problem at all, now.

henry 2006-03-08 12:02

I've learnt to always use visudo to edit /etc/sudoers. It has built-in error checks. I wonder why no one here uses it.

Hedgecore 2006-03-08 16:36

Just a suggestion, but if you're inexperienced with linux you might not want to be using root now.

odyssos 2006-03-08 17:56

Quote:

Originally Posted by Hedgecore
Just a suggestion, but if you're inexperienced with linux you might not want to be using root now.

You are right.
I reflashed it, now it's like new

Thanks

Hedgecore 2006-03-08 21:19

Everyone says "don't use root" but never really tells you why... when logged in as root in my early days in Slackware (I've never done more than dabble for a few months at a time) I've:

Moved my entire filesystem to under the /etc directory (mv /* /etc)...

Deleted my kernel (don't ask)

Completely hooped any chance of booting because I edited too many startup files at once and broke the file format on multiple ones.

Almost turned my monitor into a paperweight trying to force a higher hSync back when you had to have XWindows probe your monitor. (There were warnings about monitors possibly catching fire).

So in a nutshell, grab a live version of linux like Knoppix or Ubuntu, boot it on your desktop, and play around. Look up shell commands, try them out, become comfortable. After that you'll be able to use the root user to mod your 770. Before that, you're playing with fire.

(Oh, and for the record I liked to run UMSDOS as my FS way back when, so all I had to do was boot back into DOS and move the directory back or copy the kernel back to the root directory from my UMSDOS boot dir. So far as the startup script learning experience, or my how-to-turn-a-monitor-into-a-marshmallow-warmer-in-one-easy-step one, the monitor still worked. The scriptage lead to a reinstall.)


All times are GMT. The time now is 09:16.

vBulletin® Version 3.8.8