Reply
Thread Tools
eight's Avatar
Posts: 106 | Thanked: 81 times | Joined on Dec 2011 @ /
#11
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.
 

The Following User Says Thank You to eight For This Useful Post:
Posts: 1,225 | Thanked: 1,905 times | Joined on Feb 2011 @ Quezon City, Philippines
#12
Originally Posted by pursueky View Post
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.
__________________
N9 PR 1.3 Open Mode + kernel-plus for Harmattan
@kenweknot, working on Glacier for Nemo.
 
pursueky's Avatar
Posts: 191 | Thanked: 46 times | Joined on Jun 2010 @ NanJing China
#13
Originally Posted by eight View Post
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's Avatar
Posts: 1,455 | Thanked: 3,309 times | Joined on Dec 2009 @ Rochester, NY
#14
Originally Posted by pursueky View Post
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.

Last edited by woody14619; 2012-01-07 at 00:17.
 

The Following 2 Users Say Thank You to woody14619 For This Useful Post:
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#15
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
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!
 

The Following User Says Thank You to Estel For This Useful Post:
Posts: 2,102 | Thanked: 1,937 times | Joined on Sep 2008 @ Berlin, Germany
#16
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
 

The Following User Says Thank You to michaaa62 For This Useful Post:
pursueky's Avatar
Posts: 191 | Thanked: 46 times | Joined on Jun 2010 @ NanJing China
#17
Originally Posted by Estel View Post
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's Avatar
Posts: 1,455 | Thanked: 3,309 times | Joined on Dec 2009 @ Rochester, NY
#18
Originally Posted by michaaa62 View Post
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.
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 04:57.