Author Topic: "su" big mistake...  (Read 921 times)

Offline ExoTek

  • Jr. Member
  • **
  • Posts: 37
  • I have been assimilated, resistance was futile...
"su" big mistake...
« on: June 08, 2012, 11:45:50 AM »
Hey guys,

I think I messed up big time this time!...  :(

I was trying to install something on my pc (xbasic for linux) using the command line "tar". The instruction tells you to copy the tarball to your root and unzip it there but I tried to unzipped it from "where it was" strait to "root", cause I'm so awesome, you know  ;D

I ended up unzipping it into root's home folder (didn't even know that this even existed  :-\ ). So anyway, not knowing the existence of root's home directory takes nothing away from my awesomeness right, so I brilliantly copied the "usr" (yea, USR!!!) from the root's home strait to THE root, as in "/"... using this exact command in konsole:
[steeve@localhost ~]$ su [ENTER]
Password: (hitting a few keys) [ENTER]
[root@localhost ~]# mv ./usr /usr [ENTER]
[root@localhost ~]# exit [ENTER]

At that point I was still a happy man (or so I thought) until I realized that I didn't copied one "usr" into DA "usr", no sir, I actually replaced DA "usr"...  :'(  >:(  :-[

So now I really really really hope that I'm wrong when I think that I'm screwed! (Never know! Maybe someone here, hopefully, will beat me up to an inch of my life for misusing "su" and then snap their finger and "pouf!" reverse what I've done!?? Or is that wishful thinking?)...

Anyway, I am prepared to reinstall (as in "format" and "install") again so, Any idea you guys might have would be better than that!!!

Thanks in advance.
The best things in life are free.
(not my own words, but true all the same)

Online Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11542
  • ----IOFLU----
Re: "su" big mistake...
« Reply #1 on: June 08, 2012, 11:59:46 AM »
Hey guys,

I think I messed up big time this time!...  :(

I was trying to install something on my pc (xbasic for linux) using the command line "tar". The instruction tells you to copy the tarball to your root and unzip it there but I tried to unzipped it from "where it was" strait to "root", cause I'm so awesome, you know  ;D

I ended up unzipping it into root's home folder (didn't even know that this even existed  :-\ ). So anyway, not knowing the existence of root's home directory takes nothing away from my awesomeness right, so I brilliantly copied the "usr" (yea, USR!!!) from the root's home strait to THE root, as in "/"... using this exact command in konsole:
[steeve@localhost ~]$ su [ENTER]
Password: (hitting a few keys) [ENTER]
[root@localhost ~]# mv ./usr /usr [ENTER]
[root@localhost ~]# exit [ENTER]

At that point I was still a happy man (or so I thought) until I realized that I didn't copied one "usr" into DA "usr", no sir, I actually replaced DA "usr"...  :'(  >:(  :-[

So now I really really really hope that I'm wrong when I think that I'm screwed! (Never know! Maybe someone here, hopefully, will beat me up to an inch of my life for misusing "su" and then snap their finger and "pouf!" reverse what I've done!?? Or is that wishful thinking?)...

Anyway, I am prepared to reinstall (as in "format" and "install") again so, Any idea you guys might have would be better than that!!!

Thanks in advance.

While we don't recommend installing applications from outside our repo, if the .tar file contained an actual binary, and not source code, odds are you've done nothing except install the application. Slackware packages work this way.

If the .tar package was source code, you've made a mess that looks unsightly, but probably won't actually affect your installation. How are things running at the moment?
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline ExoTek

  • Jr. Member
  • **
  • Posts: 37
  • I have been assimilated, resistance was futile...
Re: "su" big mistake...
« Reply #2 on: June 08, 2012, 12:15:20 PM »
Thanks Old-Polack for such a fast answer!

Things go surprisingly well (that's why I'm scared to reboot). The "package" was is an executable but to tell you the truth, I didn't even tried it yet! My hole "/usr" is gone! All there is left is this:


... !

Wait a second there...

Ok, I really need some serious training cause I got all this really wrong!!!  :-[

I don't know how, but I didn't check my things right! my "usr" folder is still there! (or I was right and one of you guys snapped his (or her) fingers ... without the beating!!! Thank you so very much. Was it you Old-Polack?  ;D ).

Well, I'm sory for posting for no reason I guess!  :-[ :-[

The new "usr" folder was copied inside DA one...

Wow, once I stop shaking, I'm gonna try and copy it again.

How about (as "su" of course):
Code: [Select]
cd / [ENTER]
mv /usr ./ [ENTER]

It seems ok to me but... is it?
The best things in life are free.
(not my own words, but true all the same)

Online Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11542
  • ----IOFLU----
Re: "su" big mistake...
« Reply #3 on: June 08, 2012, 12:20:13 PM »
Thanks Old-Polack for such a fast answer!

Things go surprisingly well (that's why I'm scared to reboot). The "package" was is an executable but to tell you the truth, I didn't even tried it yet! My hole "/usr" is gone! All there is left is this:


... !

Wait a second there...

Ok, I really need some serious training cause I got all this really wrong!!!  :-[

I don't know how, but I didn't check my things right! my "usr" folder is still there! (or I was right and one of you guys snapped his (or her) fingers ... without the beating!!! Thank you so very much. Was it you Old-Polack?  ;D ).

Well, I'm sory for posting for no reason I guess!  :-[ :-[

The new "usr" folder was copied inside DA one...

Wow, once I stop shaking, I'm gonna try and copy it again.

How about (as "su" of course):
Code: [Select]
cd / [ENTER]
mv /usr ./ [ENTER]

It seems ok to me but... is it?

NO! DON'T DO THAT!
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline ExoTek

  • Jr. Member
  • **
  • Posts: 37
  • I have been assimilated, resistance was futile...
Re: "su" big mistake...
« Reply #4 on: June 08, 2012, 12:26:04 PM »
Phew! (didn't, I was waiting. Good thing too I guess).

Ok, (see, I know just enough to know I know nothing!)

But why not?

I'm sorry for being so rude!  :-[ I didn't thanked you for taking the time to help... Thanks.
« Last Edit: June 08, 2012, 12:28:49 PM by ExoTek »
The best things in life are free.
(not my own words, but true all the same)

Online Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11542
  • ----IOFLU----
Re: "su" big mistake...
« Reply #5 on: June 08, 2012, 12:35:44 PM »

How about (as "su" of course):
Code: [Select]
cd / [ENTER]
mv /usr ./ [ENTER]

It seems ok to me but... is it?

[root@localhost ~]# cd /usr                               <Enter>

[root@localhost usr]#                             <-- Note the change in the location

[root@localhost usr]# ls -l |grep usr                                    <Enter>
drwxr-xr-x   2 root root   4096 Jun  8 13:27 usr/

[root@localhost usr]# cd /usr/usr                                    <Enter>

Note: Use the full path above, to be sure of where you end up.

[root@localhost usr]# ls -l                                 <Enter>

Post your results.
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline ExoTek

  • Jr. Member
  • **
  • Posts: 37
  • I have been assimilated, resistance was futile...
Re: "su" big mistake...
« Reply #6 on: June 08, 2012, 12:40:00 PM »
Followed everything to the letter, here's the result:
Quote
[steeve@localhost ~]$ su
Password:
[root@localhost ~]# cd /usr
[root@localhost usr]# ls -l | grep usr
drwxrwxr-x   5 root root   4096 Aug  2  2006 usr/
[root@localhost usr]# cd /usr/usr
[root@localhost usr]# ls -l
total 12
drwxrwxr-x 2 root root 4096 Aug  2  2006 bin/
drwxrwxr-x 2 root root 4096 Aug  2  2006 lib/
lrwxrwxrwx 1 root root   13 Aug  2  2006 xb -> /usr/xb-6.3.0
drwxrwxr-x 9 root root 4096 Aug  2  2006 xb-6.3.0/
[root@localhost usr]#
The best things in life are free.
(not my own words, but true all the same)

Online Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11542
  • ----IOFLU----
Re: "su" big mistake...
« Reply #7 on: June 08, 2012, 04:34:39 PM »
Followed everything to the letter, here's the result:
Quote
[steeve@localhost ~]$ su
Password:
[root@localhost ~]# cd /usr
[root@localhost usr]# ls -l | grep usr
drwxrwxr-x   5 root root   4096 Aug  2  2006 usr/
[root@localhost usr]# cd /usr/usr
[root@localhost usr]# ls -l
total 12
drwxrwxr-x 2 root root 4096 Aug  2  2006 bin/
drwxrwxr-x 2 root root 4096 Aug  2  2006 lib/
lrwxrwxrwx 1 root root   13 Aug  2  2006 xb -> /usr/xb-6.3.0
drwxrwxr-x 9 root root 4096 Aug  2  2006 xb-6.3.0/
[root@localhost usr]#

First, lets move /usr/usr back to /root.

[root@localhost usr]# cd                    <Enter>

[root@localhost ~]# mv /usr/usr /root                         <Enter>

[root@localhost ~]# ls -l /usr |grep usr                          <Enter>

You should just get a return to the prompt.

Since this is a small set of files, let's use cp -av this time.

[root@localhost ~]# cp -av usr /                          <Enter>

You should get a list of files and directories being transferred to /usr, /usr/bin, and /usr/lib as output results.

Post your results.
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline ExoTek

  • Jr. Member
  • **
  • Posts: 37
  • I have been assimilated, resistance was futile...
Re: "su" big mistake...
« Reply #8 on: June 09, 2012, 04:47:26 AM »
... Testing...

...  ???

Now it works...

I am trying to post my results but every time I hit the "post" button I get that page that tells me that the connection was reset or something... That the second time I get this kind of problem... And now I try to post anything just to see what happens, and of course that works!...

Ok. I'm gonna try to post my previous message again (when it didn't worked, I "copy/past"ed it to my text editor.)
« Last Edit: June 09, 2012, 04:52:07 AM by ExoTek »
The best things in life are free.
(not my own words, but true all the same)

Offline ExoTek

  • Jr. Member
  • **
  • Posts: 37
  • I have been assimilated, resistance was futile...
Re: "su" big mistake...
« Reply #9 on: June 09, 2012, 04:56:56 AM »
Ok, that's emparassing  :-[

I just can't post my result!  ???

When I do, I get this message:
Quote
The connection was reset
      
      
      
      
      
        
        
          The connection to the server was reset while the page was loading.
        

        
        

  The site could be temporarily unavailable or too busy. Try again in a few
    moments.
  If you are unable to load any pages, check your computer's network
    connection.
  If your computer or network is protected by a firewall or proxy, make sure
    that Firefox is permitted to access the Web.

...

Anyway, what I really wanted to say was:

Thanks a million to Old-Polack for your help, everything works now.  ;D
« Last Edit: June 09, 2012, 05:05:12 AM by Old-Polack »
The best things in life are free.
(not my own words, but true all the same)

Online Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11542
  • ----IOFLU----
Re: "su" big mistake...
« Reply #10 on: June 09, 2012, 05:05:55 AM »

Anyway, what I really wanted to say was:

Thanks a million to Old-Polack for your help, everything works now.  ;D

You're welcome.  ;D
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...