maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   How can I solve this problem ? ?? Who could teach me ... (https://talk.maemo.org/showthread.php?t=81389)

eight 2012-01-06 15:45

Re: How can I solve this problem ? ?? Who could teach me ...
 
Backupmenu is also a suggestion for situations like this. It only takes a few minutes to make a backup and you can restore the entire system if something goes wrong.

Hurrian 2012-01-06 22:06

Re: How can I solve this problem ? ?? Who could teach me ...
 
Quote:

Originally Posted by pursueky (Post 1146534)
that 's what I did yesterday:
chmod -R 755 /usr/bin

Unless you have a very good reason to do so, never reset the permissions on system files. Reset them only when they won't execute, and even then, don't use the octal system. Just chmod +x.

pursueky 2012-01-06 23:37

Re: How can I solve this problem ? ?? Who could teach me ...
 
Quote:

Originally Posted by eight (Post 1146672)
Backupmenu is also a suggestion for situations like this. It only takes a few minutes to make a backup and you can restore the entire system if something goes wrong.

But I can't install apps also can't remove any one.

woody14619 2012-01-07 00:05

Re: How can I solve this problem ? ?? Who could teach me ...
 
Quote:

Originally Posted by pursueky (Post 1146870)
But I can't install apps also can't remove any one.

The concept is to have already installed BackupMenu, and made a backup. It's like saying "you should restore from backups" and you're saying "but I didn't do a backup". If you didn't already do a backup, you're pretty SOL. BackupMenu also would give you the option of mounting the whole file system directly on another machine, where you could then edit permissions on the raw files if you liked...

If you already have sshd installed, you may be able to get access that way, as suggested earlier. If not, maybe you'll luck out and something somewhere else has an suid-bit set you can exploit in some way. Try this command:

Code:

find / -perm -4000 -print
That may find something suid you can use to "break in" with? If you do manage to get in, you'll need to fix several files:

Code:

Nokia-N900-42-11:~/scripts# ls -l `find /usr/bin -perm -4000`
-rwsr-xr-x    1 root    root      /usr/bin/chfn
-rwsr-xr-x    1 root    root      /usr/bin/chsh
-rwsr-xr-x    1 root    root      /usr/bin/eapd
-rwsr-xr-x    1 root    root      /usr/bin/fusermount
-rwsr-xr-x    1 root    root      /usr/bin/gpasswd
-rwsr-xr-x    1 root    root      /usr/bin/gpg
-rwsr-xr-x    1 root    root      /usr/bin/hildon-sv-notification-daemon
-rwsr-xr-x    1 root    lpadmin  /usr/bin/lppasswd
-rwsr-xr-x    1 root    root        /usr/bin/mission-control
-rwsr-xr-x    1 root    root        /usr/bin/passwd
-r-sr-sr-x    1 root    root        /usr/bin/pnatd
-rwsr-xr-x    1 root    root        /usr/bin/rclockd
-rwsr-xr-x    2 root    root      /usr/bin/sudo
-rwsr-xr-x    2 root    root      /usr/bin/sudoedit

Edit: One thing of note, /bin/su would be unaffected by this. So if you have set a root password (via sshd or sudo in the past), you should still be able to use /bin/su - to change to root and fix things that way.

Estel 2012-01-07 00:09

Re: How can I solve this problem ? ?? Who could teach me ...
 
Rescue OS (search forum) is also and idea, for people that haven't installed backupmenu.

Just out of curiosity - may I ask, why You decided to execute so ridiculous command? I admit that it's better than rm -r /, but i still can't see any sane reasons to even think about that,

/Estel

michaaa62 2012-01-07 10:38

Re: How can I solve this problem ? ?? Who could teach me ...
 
Quote:

Edit: One thing of note, /bin/su would be unaffected by this. So if you have set a root password (via sshd or sudo in the past), you should still be able to use /bin/su - to change to root and fix things that way.
su is not set suid per default. It was never meant to be used :(

Please stop complaining about what you have not installed, just answer the questions about what actually is installed to gain the rights of root. If non of the methods you were asked before in this thread are installed, go to the wiki page about reflashing http://wiki.maemo.org/Updating_the_tablet_firmware

pursueky 2012-01-07 11:19

Re: How can I solve this problem ? ?? Who could teach me ...
 
Quote:

Originally Posted by Estel (Post 1146878)
Rescue OS (search forum) is also and idea, for people that haven't installed backupmenu.

Just out of curiosity - may I ask, why You decided to execute so ridiculous command? I admit that it's better than rm -r /, but i still can't see any sane reasons to even think about that,

/Estel

To install GoAgent in my N900
and it needs to do
python2.6 xx
so I chmod the whole dir.

woody14619 2012-01-10 03:14

Re: How can I solve this problem ? ?? Who could teach me ...
 
Quote:

Originally Posted by michaaa62 (Post 1147018)
su is not set suid per default. It was never meant to be used :(

Hmmm... really? It's suid on my device, and I don't recall setting it that way. But it's more than possible I did set it long ago. I've only had to reflash twice, and that was really early on when playing with some of the early kernel hacks. (And once of those was just to reflash the kernel.)

Outside of that, only about 3 other files on my device are suid, and none of them are anything you can use to break in. All the more reason to install BackupMenu and/or sshd right from the get-go on a new system.


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

vBulletin® Version 3.8.8