Thread: root password
View Single Post
Posts: 701 | Thanked: 585 times | Joined on Sep 2010 @ London, England
#25
Originally Posted by shailesh View Post
it was asking for a password (however it was not accepting the paasword) but now if i try to do sudo su -
it says
sorry, user user is not allowed to execute '/bin/su -' as root on Nokia-900.
i am pretty sure this wasnt the case earlier.
can u help me with this as well sir.
As I said before, it is sudo asking for your user password, so you must have entered your user password, it was accepted then sudo is telling you you don't have permission to run /bin/su.

To fix this you need to edit your /etc/sudoers file, it is dangerous to edit this file manually because if you don't do it properly sudo will complain and stop working, instead it is advisable to edit this with the command visudo (which will verify any changes you make for correctness before saving the new file), unfortunately visudo defaults to using the "vi" editor which isn't the easiest for a noob (but I like it).

For the fix:
- Become root using the command "root"
- Run "visudo"
- Switch vi to insert mode by pressing "i"
- Add either "user ALL=(ALL) /bin/su" to enable that specific command with sudo or "user ALL=(ALL) ALL" to enable all commands with sudo, and add it to the top of the file.
- Switch vi back to command mode by pressing "Esc"
- Save and quit vi by typing ":wq"