maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Maemo 5] Problems with Rootsh (https://talk.maemo.org/showthread.php?t=50510)

MohammadAG 2010-04-20 13:20

Re: QWERTY12 (ROOTSH) - I Need help PLEASE
 
Quote:

Originally Posted by nokian-series (Post 619226)
If Sudo <Command> dont work, why can i do that before reflash ?!

There's a package in -devel that somehow enables sudo to work (I'm not sure if it's cause I changed the password for user, or the pass for root).
If you want to try to see which application it is be my guest.

Quote:

BusyBox v1.10.2 (Debian 3:1.10.2.legal-1osso26+0m5) built-in shell (ash)
Enter 'help' for a list of built-in commands.

~ $ sudo su


BusyBox v1.10.2 (Debian 3:1.10.2.legal-1osso26+0m5) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/home/user # exit
~ $ whoami
user
~ $ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
avahi-daemon extcalllog kernel kernel-flasher kernel-modules
libpulse-mainloop-glib0 libpulse0 mplayer pulseaudio
pulseaudio-esound-compat pulseaudio-module-bluetooth pulseaudio-module-gconf
pulseaudio-module-hal pyside-qt4-core pyside-qt4-gui xulrunner
0 upgraded, 0 newly installed, 0 to remove and 16 not upgraded.
Edit: it's one of these http://pastebin.com/1mA5JbHF

nokian-series 2010-04-20 13:41

Re: QWERTY12 (ROOTSH) - I Need help PLEASE
 
Quote:

Originally Posted by MohammadAG (Post 619337)
There's a package in -devel that somehow enables sudo to work (I'm not sure if it's cause I changed the password for user, or the pass for root).
If you want to try to see which application it is be my guest.



Edit: it's one of these http://pastebin.com/1mA5JbHF

WOW, so ... it really exists a package that actualy do that!
But no one knows it.. hum .. right...

nokian-series 2010-04-21 20:30

Re: [Maemo 5] Problems with Rootsh
 
Hey all..
I think i discover the problem.
Somehow, before reflash, my \sys\* is on read\write\execute to my user.
But actualy, i cant modify it (i can, but before restart, everything goes back to read only).

Any one knows how to change it ?

I've googled a little but..nothing..

Rob1n 2010-04-21 20:56

Re: [Maemo 5] Problems with Rootsh
 
Quote:

Originally Posted by nokian-series (Post 621547)
Hey all..
I think i discover the problem.
Somehow, before reflash, my \sys\* is on read\write\execute to my user.
But actualy, i cant modify it (i can, but before restart, everything goes back to read only).

Any one knows how to change it ?

I've googled a little but..nothing..

What are you actually trying to do? /sys is a virtual file system giving access into the internals of the kernel/modules. The permissions are set by the kernel/modules so can't be messed around with by the user (even as root).

nokian-series 2010-04-21 21:17

Re: [Maemo 5] Problems with Rootsh
 
I'm trying to change the value on, for exemple:
/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
with this command:
sudo echo 1000000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
using: queen beecon widget

Please dont tell me it doesent work..i've donne it before re-flash my device as you can easly see by editing my queen_beecon file on:
http://www.4shared.com/dir/37234484/...on_Widget.html

If that permissions are set by kernel-modules..maybe..before i was using maemo 23 i thing with OC ..now i'm using maemo25 (are that modules included on that you're talking?)

titan 2010-04-21 21:49

Re: [Maemo 5] Problems with Rootsh
 
/sys is a virtual file system where you cannot store files. it is just for the communication with the kernel.
changing permissions on /sys is pointless. there were no changes on /sys in the different kernels version.

I have removed the remaining occurrences of "sudo" before commands in my tutorials - it was a mistake. sudo works only with specific commands but not with echo etc.

If you really want to use "sudo" with scripts, create a script which will run as root (i.e. no sudo in the script) and put an entry in /etc/suders.d so that can run the script using
"sudo script"

nokian-series 2010-04-21 22:25

Re: [Maemo 5] Problems with Rootsh
 
Actualy, what i need is to use Queen Beecon Widget with some CMDs like: echo 900000 > /sys/devices/.../scaling_max_freq.

So, what it's needed to do ?

Add the executable of Queen Beecon Widget t Sudoers file?
It's that? If is...what to put in suddoers, please.

Actualy, to use the "scripts" i've created on Queen Beecon Widget, i need to change permissions on that files /sys/devices/.../scaling_max_frq , and thats boring because when i reboot the phone, i need to set them again and again.

Queen Beecon Widget dont allow you to put CMDs with root or sudo gaind root.

* I still dont undurstanding why i can do it before re-flash, but, if i go throught the problem..dont worrie *

Thank you all for helping.

Quote:

Originally Posted by titan (Post 621629)
/sys is a virtual file system where you cannot store files. it is just for the communication with the kernel.
changing permissions on /sys is pointless. there were no changes on /sys in the different kernels version.

I have removed the remaining occurrences of "sudo" before commands in my tutorials - it was a mistake. sudo works only with specific commands but not with echo etc.

If you really want to use "sudo" with scripts, create a script which will run as root (i.e. no sudo in the script) and put an entry in /etc/suders.d so that can run the script using
"sudo script"


Rob1n 2010-04-22 08:00

Re: [Maemo 5] Problems with Rootsh
 
Quote:

Originally Posted by nokian-series (Post 621601)
I'm trying to change the value on, for exemple:
/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
with this command:
sudo echo 1000000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
using: queen beecon widget

That command line won't work because you're just using sudo to run "echo" with su privileges - the redirect happens with normal user privileges so fails.

Try "echo 1000000 | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq"

You may need to add "tee" to the sudoers configuration first.

nokian-series 2010-04-22 20:43

Re: [Maemo 5] Problems with Rootsh
 
just used:

echo "echo 900000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq" | sudo gainroot

it works...so, finaly, i've back my own Overclock UI..like i had before reflash my n900. Still strange why it works before and this time it takes 4 times (x) more commands, but..just fine..it works...hardly, but..it works... thank you for all of you that help me sugesting me to try some commands and explaining me some things.

Sorry to QWERTY12, maybe not a rootsh problem ( :

Cheers to all.
Thread may be closed!

SOLVED. (Workarrounded but solved, aftar 5 days without sleep.. : \ lol :P )


All times are GMT. The time now is 09:37.

vBulletin® Version 3.8.8