Reply
Thread Tools
Posts: 43 | Thanked: 1 time | Joined on Jan 2006 @ Spokane, WA.
#11
Not sure I can help you here, Jason. Have you tried to ssh into it as root? I think the password is rootme. You should then be able to edit the sudoers file.
 
Posts: 43 | Thanked: 1 time | Joined on Jan 2006 @ Spokane, WA.
#12
Anyone know if visudo has been ported to the 770? It would have helped prevent Jason's problem.
 
Posts: 66 | Thanked: 3 times | Joined on Dec 2005
#13
Originally Posted by thedarksavant
Anyone know if visudo has been ported to the 770? It would have helped prevent Jason's problem.
In short: Yes.

I reflashed. Then I set out to get visudo working. I installed vim-tiny from
ftp://ftp.debian.org/debian/pool/main/v/vim/

then linked vim-tiny to /usr/bin/editor

at that point visudo now works.

Fun times.

-Jason
__________________
maps.i40.com - Google maps sized for the 770 @ 150% - scroll below the map for features
ukmaps.i40.com - Google UK maps - Pan and Zoom only.
wiki.i40.com/Nokia770 - Random Nokia 770 notes.
 
Posts: 190 | Thanked: 5 times | Joined on Nov 2005 @ Bee-u-tee-ful Garden Home, Oregon
#14
Originally Posted by Chainsaw76
then linked vim-tiny to /usr/bin/editor
Of course this also works:

export VISUAL=/var/lib/install/usr/bin/vim
visudo

(change the path to suit your personal needs ;-))

Brad.
 
jayholler's Avatar
Posts: 128 | Thanked: 4 times | Joined on Feb 2006 @ Philadelphia, PA
#15
Originally Posted by bradb
Of course this also works:

export VISUAL=/var/lib/install/usr/bin/vim
visudo

(change the path to suit your personal needs ;-))

Brad.
ok, so i tried the above method from within x-term, running as root, and it is not working for me. i just want to edit /etc/sudoers to allow for control of the swapon/swapoff function included in the new load_plugin_aw. any ideas how to do this?

btw, i'm using the extrootfs and swapfile method from the maemo.org howto wiki.

UPDATE: I did it! I'll post a quick step by step here now:

Following the suggestions of someone in the "What's on your 770" I completed the following:

Edit 'ld.so.conf' and add a line for '/var/lib/install/usr/lib', then run 'ldconfig'. This means you'll always have access to libraries you install (and actually corrects a maemo bug [1.1rc5] for user installed home plugins)

Then, I created a .profile file in /Root/home/user with the line 'export PATH=$PATH:/Root/var/lib/install/usr/bin' and put it in /home/user (with owner/group user/users) i skipped his suggestion of inserting this in /root because there already was a .profile file and I didn't want to mess with said file.

so then I could launch visudo from /usr/sbin/visudo (i think that's the directory, you can find it with 'find / -name visudo' (make sure you 'export VISUAL=/var/lib/install/usr/bin/vi' first!) I just do this every time I launch visudo, not sure if that's necessary, but it worked for the few times I went in to mess with things until I got the lines edited appropriately.

then I added the lines:

'user ALL = NOPASSWD: /sbin/swapoff
user ALL = NOPASSWD: /sbin/swapon'

That's it! Now my load-plugin will turn /Root/swapfile on and off without needing x-term or root access. Sweet.

Keep in mind this was with the extrootfs installed, as well as x-term and vim-tiny. Most of my directories include /Root in front after installing and running the extrootfs script, like /Root/var/lib/install/usr/bin instead of /var/lib/install/usr/bin

ps-this device rocks. I have not learned so much about *nix commands so quickly and easily. Partly this is due to the great community here on the forums, and the knowledgable people to keep us noobs from bricking our device everyday. I only had to reflash twice so far!

Last edited by jayholler; 2006-03-15 at 21:11.
 
Reply


 
Forum Jump


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