![]() |
Edited sudoers, now N800 won't finish booting
I have an N800 with OS2008, got it just last week. I was logged in as root via ssh from my PC and edited the sudoers file (using visudo). I then opened X-terminal as user and was able to log in as root using 'sudo su' and entering root's password. So all looked good at this point.
I then logged out and powered off the N800, then powered on to reboot it. It started to boot, screen lit up with 'NOKIA', but when the blue line reached the far right that's where it stopped. After some time the screen dims and then goes dark, turns bright again if I tap the screen. It's connected to the power supply so the battery won't run down. What can be done to restore my original sudoers file? I saved a copy of the original sudoers on the N800 as well as on my PC. I don't yet know much about how to use the sudoers file. Below is a copy of the one that's in there now, and probably caused the failed boot. Code:
Defaults env_check+="HOME DISPLAY" |
Re: Edited sudoers, now N800 won't finish booting
Did you change the file access permissions of the /etc/sudoers file, by chance?
It should be: -r--r----- 1 root root |
Re: Edited sudoers, now N800 won't finish booting
Quote:
In order to power down, I had to remove and re-insert the battery. Then I tried to reflash OS2008, but the N800 would not go into the firmware upload mode. I phoned Nokia tech support, they told me to send it in for warranty repair. |
Re: Edited sudoers, now N800 won't finish booting
I don't 'know' but, I read there is a battery that keeps time, and perhaps other status info. Take the battery out for two hours and leave unplugged. Then you should be able to get to the update mode at least.
|
Re: Edited sudoers, now N800 won't finish booting
Quote:
Quote:
|
Re: Edited sudoers, now N800 won't finish booting
Hmmm, so that could explain why i had to reflash my n800 4 time since i had it (yesterday)... It may well be the sudoers modification (done via visudo, in a way that used to work on n800). I was thinking one third party program was doing it, without finding wich one....
Note that reflashing the tablet always worked here. |
Re: Edited sudoers, now N800 won't finish booting
Quote:
|
Re: Edited sudoers, now N800 won't finish booting
Hmm, my OS2008 sudoers file is MUCH longer than yours. I haven't touched it.
In case it helps: Code:
### Automatically added by update-sudoers start ### |
Re: Edited sudoers, now N800 won't finish booting
Quote:
I've had startup problems myself, so I won't try it to confirm for you. Edit; guess I was wrong and removed rude comment. |
Re: Edited sudoers, now N800 won't finish booting
Quote:
Flashing usually works whether you hold the Home button or not, but it's one of those things which people can overlook so is worth asking. If you hold the Home button it will go to flash mode whether it's connected to a computer or not (or will wait longer for a computer to "appear") - if you don't hold the button it will only go to flash mode if it's connected to a computer. Or something like that - holding the button can make a crucial difference. The OP never mentioned it, so I asked. Maybe I shouldn't have bothered... :) |
Re: Edited sudoers, now N800 won't finish booting
Quote:
[Middle English condescenden, from Old French condescendre, from Late Latin condēscendere : Latin com-, intensive pref.; see com- + dēscendere, to descend; see descend.] |
Re: Edited sudoers, now N800 won't finish booting
Quote:
Like you said, the home key hold just forces it into that mode if your flasher isn't running. Nokia is probably correct to suggest you send your tablet in for warranty even if you have been messing with sudoers as I can't see anything you could possibly do to sudoers file that would prevent reflashing of the firmware. Most likely a hardware failure. Hope you get a replacement soon and it doesn't get caught in tablet limbo like some of the horror stories I have read here. You might do some searching of the forums to find the proper service place to send it. |
Re: Edited sudoers, now N800 won't finish booting
Well, I sent it off today. When I tried to reload the firmware yesterday I had it connected to a USB port on my computer, but not the same port I used for the first firmware flash. The first time I flashed it using a USB 1.1 port which is built-in to my notebook computer. For this last attempt, I used a USB 2.0 PCMCIA card inserted into a PCMCIA slot. If the USB 2.0 PCMCIA card was somehow incompatible with the N800, or incompatible with Nokia's flash program, then the N800 would not have entered the firmware upload mode, which is of course what was observed. I should have tried it with the USB connected to the older USB 1.1 port that worked for the first flash operation, but of course I was following Nokia's flashing instructions which failed to mention that the firmware upload mode was entered by powering on while connected to a computer's USB port, and that holding Swap key was superfluous.
It will be interesting when the N800 comes back to me. I will check it out with both my USB 1.1 and 2.0 ports. If it won't go into flash mode while connected to my USB 2.0 PCMCIA card that would indicate that I need not have sent it off for warranty service. |
Re: Edited sudoers, now N800 won't finish booting
I'm pretty new here, but I thought I throw in my $0.02 at this problem (the sudoers problem that is, not the booting), since I have had it as well. I'm not too well at home in the N800's OS yet, but I've got my share of Linux experience and certs so here goes:
What I think the problem is, is that the N800 uses a passwordless sudo command sometime during the boot sequence, possibly at more than one point. What a lot of desktop Linux distro's do is place an item like %wheel ALL = (ALL) ALL in the sudoers file. It is very tempting to put such an entry in the sudoers on the N800. That way, you can log in and execute commands as root fairly securely. The last matching entry for a user in sudoers is used by sudo, so effectively, this means I can now execute all programs as root, but I need to *always* enter a password. And there is your problem: during boot, the N800 needs to be able to execute some stuff by sudo *without a password*. But since we just overrode this by putting '%users ALL = (ALL) ALL' at the bottom of the sudoers file, sudo is now waiting for our input during boot, which will never arrive :D Someone opted earlier that the permissions on the sudoers file might have been wrong or that the syntax was faulty. visudo is supposed to protect you from both and afaik does a pretty good job at it. I don't think any of these options were part of the problem here. Anyway, I reckon that putting the entry at the top of the sudoers file would be safe, but I haven't tested this. Hope this helps some of you and hope it saves you from flashing your device 17.000 times during the first days you own it ;-) And that just leaves me, with all my certifications, bashing my head against the wall for being such an a**e for taking so long to solve this :) |
Re: Edited sudoers, now N800 won't finish booting
Hi wzzrd,
Thanks for the insight into what was most likely happening. I just want to be able to use su to become root as I normally do in my desktop Linux. I maintain a Linux repository and am pretty good with rsync, but other than that my Linux knowledge is limited. Do you think you could come up with an N800 sudoers file that will do the trick? |
Re: Edited sudoers, now N800 won't finish booting
I'll give it a shot today. Hope I don't end up flashing the device. Again. :)
If it works, I'll let you know. By the way, personally, I would go for using sudo whenever possible and refrain from working as root, but that's a choice you have to make for yourself. If this won't work, you can install openssh, create an ssh key, and enable login with that key as root. Than you create an alias for the user account like: alias beroot='ssh root@localhost' That should do the trick as well. But: I need the sudoers file as well, so I'll get back to you. |
Re: Edited sudoers, now N800 won't finish booting
As i thought: it works for me with
user ALL = (ALL) ALL at the *top* of /etc/sudoers. After reboot I can still use the device :-) beware though! ymmv! |
Re: Edited sudoers, now N800 won't finish booting
In the beginning I was trying to run a WiFi scanning program that needs to be root in order to display full data, that's how I got into the sudoers problem. I had in fact set up ssh access (using a key pair) from user to root account and it worked, but thought it would be using CPU time to encrypt the data between root and user so I tried the sudoers method. I have now received my N800 back from warranty repair and will have some time to work with it again within the next week.
So you took the 2008 OS factory sudoers and added user ALL = (ALL) ALL at the top? I just want to make sure I do it exactly as you did. If I have user ALL = (ALL) ALL at top of my sudoers, is there any reason to leave the remaining lines in the sudoers? |
Re: Edited sudoers, now N800 won't finish booting
Quote:
BTW: you should install openssh. I once locked myself out of sudo and ssh saved my ***. |
Re: Edited sudoers, now N800 won't finish booting
Quote:
Second: yes, an ssh connection will put some (minor) burden on the cpu. Third: Please, if you have important data on your n800, make a backup before toying with your sudoers file: I cannot guarantee that it will not break your os, forcing you to reflash... Good luck. ;-) |
All times are GMT. The time now is 17:02. |
vBulletin® Version 3.8.8