maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   General (https://talk.maemo.org/forumdisplay.php?f=7)
-   -   [Question] rm'ing .pub (https://talk.maemo.org/showthread.php?t=22605)

Ricky-Lee 2008-08-06 17:04

[Question] rm'ing .pub
 
I lent my friend my n800 for a day to give him a hands on test to see if it would be any good for his needs upon returning it I have noticed he must have run ssh-keygen which has created a file /home/.pub which will not allow me to rm it.

Does anyone have any tips?

Thanks for any help in advance.

qwerty12 2008-08-06 17:09

Re: [Question] rm'ing .pub
 
Sounds like it was done as root.

Install your favourite root access package (rootsh, sudser etc)
run:
sudo gainroot
rm -rf /home/user/.pub

Ricky-Lee 2008-08-06 17:15

Re: [Question] rm'ing .pub
 
qwerty12: Thanks for the fast reply, yes the dir was crated as root and I have tryed to rm it in the given way but yet it still does not remove itself

Quote:

MiniDemon:~# rm -rf /home/user/.pub; ls -als
4 -rw------- 1 root root 1675 Aug 6 15:04

4 -rw-r--r-- 1 root root 396 Aug 6 15:04
.pub
4 drwxr-xr-x 6 root root 4096 Aug 6 16:36 .
4 drwxr-xr-x 24 root root 4096 Aug 5 19:55 ..
4 -rw-r--r-- 1 root root 163 Aug 6 17:14 .ash_history
4 -rw-r--r-- 1 root root 412 May 5 07:35 .bashrc
0 -rw-r--r-- 1 root root 0 Aug 5 14:21 .gnokii-errors
4 drwx------ 2 root root 4096 Jul 27 10:26 .gnome2
4 drwx------ 2 root root 4096 Aug 6 16:51 .links
4 -rw-r--r-- 1 root root 202 May 5 07:35 .profile
4 drwx------ 2 root root 4096 Aug 6 15:18 .ssh
4 drwxr-xr-x 7 root root 4096 Aug 5 20:07 workbench
MiniDemon:~#
I have just noticed the directory seems out of line from the ls output :/

qwerty12 2008-08-06 17:16

Re: [Question] rm'ing .pub
 
You are in the root home dir.

Try rm -rf /root/.pub

Ricky-Lee 2008-08-06 17:24

Re: [Question] rm'ing .pub
 
Well didn't I make it look like I know nothing about Linux and its filesystem, I have been trying in the correct way before "rm -rf /root/.pub" will no luck, what I did find is when I typed "rm -rf /root/." then pressed TAB twice the files listed did not list .pub in there.

I have found the solution though.

rm /root/*.pub

Seems there was a space in there some where for some reason, I have tested by creating a dir with a space infront of it an found that the N800 diablo does not show a \ a for the dir name like most current Linux OS's do.

They really should change this I think, then again this is just person prefence for me.

qwerty12: Thanks none the less for your help

Ricky-Lee 2008-08-06 17:26

Re: [Question] rm'ing .pub
 
Quote:

MiniDemon:~# ls -als
4 -rw------- 1 root root 1675 Aug 6 15:04

4 drwxr-xr-x 6 root root 4096 Aug 6 17:24 .
4 drwxr-xr-x 24 root root 4096 Aug 5 19:55 ..
4 -rw-r--r-- 1 root root 119 Aug 6 17:25 .ash_history
4 -rw-r--r-- 1 root root 412 May 5 07:35 .bashrc
0 -rw-r--r-- 1 root root 0 Aug 5 14:21 .gnokii-errors
4 drwx------ 2 root root 4096 Jul 27 10:26 .gnome2
4 drwx------ 2 root root 4096 Aug 6 16:51 .links
4 -rw-r--r-- 1 root root 202 May 5 07:35 .profile
4 drwx------ 2 root root 4096 Aug 6 15:18 .ssh
4 drwxr-xr-x 7 root root 4096 Aug 5 20:07 workbench
MiniDemon:~#
Seems I also have a dir which is a space :/ WTF has my friend done bla last time I am letting my device out of my sight

Ricky-Lee 2008-08-06 17:36

Re: [Question] rm'ing .pub
 
¬¬ Now this is just takeing the mick

edit/update -----------------------------------

I finaly got the unamed file to be rm'ed by useing

rm -i ./*

Benson 2008-08-06 18:24

Re: [Question] rm'ing .pub
 
Heh. Quite the 'friend'.

Ricky-Lee 2008-08-06 18:26

Re: [Question] rm'ing .pub
 
Quote:

Originally Posted by Benson (Post 210864)
Heh. Quite the 'friend'.

Ha dude if it was due to something I had done myself I would put my hand upto it but this time I did not break it.

Benson 2008-08-06 18:31

Re: [Question] rm'ing .pub
 
Yeah, those quotes were indicating doubt over how much a friend he actually was, not whether it was you yourself; while I have been on the receiving end of that lie a couple times, it's not been often enough for me to even think of it, much less assume it was true.

And I can't see how it could have been accidental, though I'm also not sure why he'd do it intentionally.

Ricky-Lee 2008-08-06 18:36

Re: [Question] rm'ing .pub
 
Only thing I can think of is he was trying to backdoor my Device an wanted to store some form of connectback shell or something that sort in the hidden file, thats really the only thing I can think of since I showed him how insecure one of the sites he built was.

Either way is sorted now anyway. Im just guna have to check what over files may have changed.

briand 2008-08-06 19:45

Re: [Question] rm'ing .pub
 
that was what I was going to say... sounds like a half-fast rootkit attempt.

glad you were able to clean it up.

jethro.itt 2008-08-07 08:26

Re: [Question] rm'ing .pub
 
Quote:

Originally Posted by briand (Post 210914)
glad you were able to clean it up.

If that "friend" of yours had unrestricted root access for any lenght of time (as has been implied) re-flash the device now! There's no telling what other hidden "surprises" your tablet has in it now.

josiahg777 2008-08-07 11:21

Re: [Question] rm'ing .pub
 
So he can SSH into the tablet whenever he wants perhaps? If he's got your private key, he can do all sorts of stuff :P

qwerty12 2008-08-07 11:22

Re: [Question] rm'ing .pub
 
Next time you see the "friend", ask if you can use the computer to check your emails and dump a few viruses on the computer.

Ricky-Lee 2008-08-08 22:48

Re: [Question] rm'ing .pub
 
Iv flashed an started from scrach, il be paying him back in kinda when I next get the chance


All times are GMT. The time now is 20:06.

vBulletin® Version 3.8.8