Reply
Thread Tools
Posts: 840 | Thanked: 823 times | Joined on Nov 2009
#11
Originally Posted by floffe View Post
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?
 
Posts: 287 | Thanked: 127 times | Joined on Oct 2009 @ Sweden
#12
"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.
 

The Following User Says Thank You to floffe For This Useful Post:
Posts: 172 | Thanked: 170 times | Joined on Jan 2010 @ Sweden
#13
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.
 

The Following 2 Users Say Thank You to stefanmohl For This Useful Post:
Posts: 804 | Thanked: 1,598 times | Joined on Feb 2010 @ Gdynia, Poland
#14
Originally Posted by stefanmohl View Post
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
 
Posts: 172 | Thanked: 170 times | Joined on Jan 2010 @ Sweden
#15
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.
 

The Following 2 Users Say Thank You to stefanmohl For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 00:14.