maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   default password and how to change it (https://talk.maemo.org/showthread.php?t=36321)

Cue 2010-02-11 06:48

Re: default password and how to change it
 
Quote:

Originally Posted by floffe (Post 510102)
sudo uses the user password rather than root, when it uses one at all. I think on the N900 it's setup to never ask for a password at all (look at /etc/sudoers but DO NOT EDIT MANUALLY). See http://talk.maemo.org/showthread.php?p=491437 for some more info.

hate to drag this up again but can I ask how do I edit the sudoers list if I'm not allowed to append it manually?

I wish to mount a samba share from a script but the mount command requires privileges.

using rootsh I gain root access and set a password for "user"

Code:

sudo gainroot
passwd user

now "sudo mount" asks for a password that I set. but I obviously get an error:
Code:

sorry, user user is not allowed to execute /bin/mount
because I do not have the appropriate line in my /etc/sudoers file. how do I go about doing this if appending it manually is not recommended?

floffe 2010-02-11 13:58

Re: default password and how to change it
 
"sudo visudo" can be used to edit sudoers (set $EDITOR to something else if you want to use another editor than vi) and will check the syntax after closing the file. See http://www.gratisoft.us/sudo/man/sudoers.html for what can go in there.

stefanmohl 2013-08-23 12:18

Re: default password and how to change it
 
Don't use visudo on Maemo! The /etc/sudoers file is auto-generated and works differently on n900 than a standard Linux system.

Instead, add a file to /etc/sudoers.d, then run 'update-sudoers'.

This is the Maemo way. The reason is that normal users don't usually have root, so an app installed by a normal user can easily add a file to /etc/sudoers.d to give itself the root privileges it needs.

misiak 2013-08-23 12:49

Re: default password and how to change it
 
Quote:

Originally Posted by stefanmohl (Post 1368907)
Don't use visudo on Maemo! The /etc/sudoers file is auto-generated and works differently on n900 than a standard Linux system.

Instead, add a file to /etc/sudoers.d, then run 'update-sudoers'.

This is the Maemo way. The reason is that normal users don't usually have root, so an app installed by a normal user can easily add a file to /etc/sudoers.d to give itself the root privileges it needs.

Good reply, but you just revived a 3yo thread ;)

stefanmohl 2013-08-23 13:10

Re: default password and how to change it
 
DuckDuckGo is my friend, and old forum threads are my results. :) I am not replying to the OP, I am just helping other search-result surfers not mess up their system too much.


All times are GMT. The time now is 20:19.

vBulletin® Version 3.8.8