Active Topics

 



Notices


Reply
Thread Tools
MohammadAG's Avatar
Posts: 2,473 | Thanked: 12,265 times | Joined on Oct 2009 @ Jerusalem, PS/IL
#21
Originally Posted by nokian-series View Post
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.

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

Last edited by MohammadAG; 2010-04-20 at 13:25.
 

The Following User Says Thank You to MohammadAG For This Useful Post:
Posts: 169 | Thanked: 41 times | Joined on Apr 2010 @ Portugal
#22
Originally Posted by MohammadAG View Post
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...

Last edited by nokian-series; 2010-04-20 at 16:35. Reason: Correct some text.
 
Posts: 169 | Thanked: 41 times | Joined on Apr 2010 @ Portugal
#23
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..
 
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#24
Originally Posted by nokian-series View Post
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).
 
Posts: 169 | Thanked: 41 times | Joined on Apr 2010 @ Portugal
#25
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?)
 
Posts: 946 | Thanked: 1,650 times | Joined on Oct 2009 @ Germany
#26
/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"
 
Posts: 169 | Thanked: 41 times | Joined on Apr 2010 @ Portugal
#27
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.

Originally Posted by titan View Post
/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"
 
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#28
Originally Posted by nokian-series View Post
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.
 
Posts: 169 | Thanked: 41 times | Joined on Apr 2010 @ Portugal
#29
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 )
 
Reply


 
Forum Jump


All times are GMT. The time now is 10:10.