Hello all,
I'm using Linux RedHat Enterprise Edition, AS 3.0.
I mistakenly did:
rm -fr /usr/sbin instead of cd /usr/sbin
I know I can't recover the directory.
I reinstalled the linux on another computer, but since the CDs weren't
much ok, i only installed it as minimal. so the webserver (httpd) isn't
working.
I tried to reinstall the httpd.2-0.54 but not working...
Can anyone with the same distribution send me a link to get the
necessary file (httpd, apachectl...)
Thanks,
|
|
0
|
|
|
|
Reply
|
marckhayat (16)
|
5/23/2005 10:21:52 AM |
|
On comp.os.linux.misc, in
<1116843712.311578.65630@o13g2000cwo.googlegroups.com>, "zeman"
wrote:
> Hello all, I'm using Linux RedHat Enterprise Edition, AS 3.0.
> I mistakenly did: rm -fr /usr/sbin instead of cd /usr/sbin
That's a good trick. Some kind of super-dyslexia?
One too many nugs?
:-)
You should never do anything as root that you can do as
a normal user.
If you are root at the moment, just do:
su username
And when you need to be root again, just do Ctrl-d and
it will log you out of username.
> I know I can't recover the directory. I reinstalled the
> linux on another computer, but since the CDs weren't much
> ok, i only installed it as minimal. so the webserver (httpd)
> isn't working. I tried to reinstall the httpd.2-0.54 but not
> working...
>
> Can anyone with the same distribution send me a link to get the
> necessary file (httpd, apachectl...)
>
> Thanks,
>
If you install the binary or from source, manually, you'll
need to make sure that you have all of its dependencies
installed first.
Be best to use rpm over the net. Or does your minimal install
not include rpm or gcc?
You need to go to the redhat website to find what you need.
AC
--
Please visit my home page:
http://angel.1jh.com./nanae/kooks/alanconnor.html
|
|
0
|
|
|
|
Reply
|
zzzzzz (1897)
|
5/23/2005 11:16:10 AM
|
|
In comp.os.linux.misc zeman <marckhayat@gmail.com>:
> Hello all,
> I'm using Linux RedHat Enterprise Edition, AS 3.0.
> I mistakenly did:
> rm -fr /usr/sbin instead of cd /usr/sbin
Arghh, IIRC rh has a default alias rm = 'rm -i' or so which
should hopefully prevent some disaster like this.
Anyway, looks to me as if you just made a rapid course in
thinking about your backup strategie, you wouldn't ask here if
you had one but simply recover the system in a few minutes from
it.
> I know I can't recover the directory.
This is from a RH ES 3.0 box, concerning all packages with files
in /usr/sbin, you might not need all, the system used is a more or
less full install:
am-utils-6.0.9-2.4
anaconda-9.1.5.8-1.RHEL
apmd-3.0.2-18
at-3.1.8-60_EL3
authconfig-4.3.7-3
autofs-4.1.3-130
bind-9.2.4-7_EL3
bonobo-activation-2.2.2-1.2E
chkconfig-1.3.13.2-0.3
chkfontpath-1.9.10-1.RHEL
cipe-1.4.5-16
clumanager-1.2.9-1
coreutils-4.5.3-26
cracklib-dicts-2.7-22
cups-1.1.17-13.3.27
cyrus-sasl-2.1.15-10
dhcp-3.0.1-10_EL3
e2fsprogs-1.32-15.1
ethereal-0.10.10-1.EL3.1
ethtool-1.8-3.3
fbset-2.1-13
firstboot-1.1.31-1
foomatic-2.0.2-15.1.1
freeradius-1.0.1-1.RHEL3
gdm-2.4.1.6-10
glibc-2.3.2-95.33
glibc-common-2.3.2-95.33
gnome-libs-1.4.1.2.90-34.2
gpm-1.19.3-27.2
hpoj-0.90-14
httpd-2.0.46-46.ent
httpd-devel-2.0.46-46.ent
hwcrypto-1.0-14
iftop-0.16-0.rhel3.dag
imap-2002d-11
initscripts-7.31.22.EL-2
iproute-2.4.7-11.30E.1
ipsec-tools-0.2.5-0.7
iputils-20020927-11.30.1
irda-utils-0.9.15-1
isdn4k-utils-3.1-76
kbd-1.08-10.2
kdenetwork-3.1.3-1.8
kernel-utils-2.4-8.37.12
kudzu-1.1.22.11-1
libcap-1.10-15.1
libgcc-3.2.3-52
libuser-0.51.7-1.EL3.3
lm_sensors-2.6.5-6
lockdev-1.0.1-1.2
logrotate-3.6.9-1
logwatch-4.3.2-2
lslk-1.29-8
lsof-4.63-4.1
MAKEDEV-3.3.12.3-1
man-1.5k-10
mgetty-1.1.30-3
mod_ssl-2.0.46-46.ent
mtr-0.52-2
netconfig-0.8.19-1.1
netdump-server-0.7.7-2
net-snmp-5.0.9-2.30E.15
nfs-utils-1.0.6-33EL
nscd-2.3.2-95.33
ntp-4.1.2-4.EL3.1
ntsysv-1.3.13.2-0.3
openldap-servers-2.0.27-17
openssh-server-3.6.1p2-33.30.4
piranha-0.7.6-1
portmap-4.0-56
postfix-2.0.16-14.RHEL3
ppp-2.4.1-14.1
prelink-0.3.2-2.EL
psacct-6.3.2-31.rhel3
pxe-0.1-36
quagga-0.96.2-10.3E
quota-3.10-7
radvd-0.7.2-4
rarpd-ss981107-14
rdist-6.1.5-35.30.1
redhat-config-bind-2.0.0-14.2
redhat-config-cluster-1.0.1-4
redhat-config-date-1.5.22-3
redhat-config-kickstart-2.3.22-3
redhat-config-mouse-1.0.13-1
redhat-config-netboot-0.1.5-1
redhat-config-network-1.2.63-1
redhat-config-network-tui-1.2.63-1
redhat-config-packages-1.2.9.2-1
redhat-config-printer-0.6.47.3.23-1
redhat-config-printer-gui-0.6.47.3.23-1
redhat-config-proc-0.23-0.EL3.1
redhat-config-securitylevel-tui-1.2.9.2-1
redhat-config-services-0.8.5-19.RHEL3.1
redhat-java-rpm-scripts-1.0.2-2
redhat-switch-mail-0.5.20-1
rhpl-0.110.6-1
rp-pppoe-3.5-4.1
rsh-server-0.17-17.6
rusers-server-0.17-40.30.2
rwho-0.17-18
samba-3.0.9-1.3E.3
samba-common-3.0.9-1.3E.3
sane-backends-1.0.9-5.7
sendmail-8.12.11-4.RHEL3.1
setuptool-1.13-1
shadow-utils-4.0.3-23.08
squid-2.5.STABLE3-6.3E.9
stunnel-4.04-4
sudo-1.6.7p5-1
sysreport-1.3.7.2-4
tcpdump-3.7.2-7.E3.5
tcp_wrappers-7.6-34.1
telnet-server-0.17-26.EL3.2
tftp-server-0.39-0.EL3.1
tmpwatch-2.8.4-5
traceroute-1.4a12-20
tux-3.2.19-2
up2date-4.2.57-2
usermode-1.68-5E.3
utempter-0.5.5-1.3EL.0
util-linux-2.11y-31.6
uucp-1.06.1-47
vixie-cron-3.0.1-76_EL3
vsftpd-1.2.1-3E.1
xcdroast-0.98a13-4
xinetd-2.3.12-6.3E
ypserv-2.8-13
yp-tools-2.8-6
You can check against your rpm db and simply reinstall any
package you have from the above list.
> I reinstalled the linux on another computer, but since the CDs weren't
> much ok, i only installed it as minimal. so the webserver (httpd) isn't
> working.
> I tried to reinstall the httpd.2-0.54 but not working...
What did you try? Which error messages did you get?
> Can anyone with the same distribution send me a link to get the
> necessary file (httpd, apachectl...)
You can download individual packages or complete .iso from rhn
(redhat network). Shouldn't be that difficult recovering.
Good luck
--
Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo zvpunry@urvzvat.qr | perl -pe 'y/a-z/n-za-m/'
#bofh excuse 395: Redundant ACLs.
|
|
0
|
|
|
|
Reply
|
USENET22 (5462)
|
5/23/2005 11:29:00 AM
|
|
Michael Heiming wrote:
> In comp.os.linux.misc zeman <marckhayat@gmail.com>:
>>Hello all,
>>I'm using Linux RedHat Enterprise Edition, AS 3.0.
>>I mistakenly did:
>>rm -fr /usr/sbin instead of cd /usr/sbin
>
> Arghh, IIRC rh has a default alias rm = 'rm -i' or so which
> should hopefully prevent some disaster like this.
>
Unfortunately the -f switch over-rides the -i switch :-(
|
|
0
|
|
|
|
Reply
|
ithinkiam (729)
|
5/23/2005 1:27:49 PM
|
|
"zeman" <marckhayat@gmail.com> writes:
>Hello all,
>I'm using Linux RedHat Enterprise Edition, AS 3.0.
>I mistakenly did:
>rm -fr /usr/sbin instead of cd /usr/sbin
>I know I can't recover the directory.
>I reinstalled the linux on another computer, but since the CDs weren't
>much ok, i only installed it as minimal. so the webserver (httpd) isn't
>working.
>I tried to reinstall the httpd.2-0.54 but not working...
rpm -Va|grep '^..5'
will list for you all the files which are not the same as installed,
including all the missing files.
Note that it will also list configuration files. which you do not want to
replace.
You probably want
rpm -Va|grep '^..5'|grep 'usr\/sbin'
Which will tell you all of the files in /usr/sbin which have changed. Then
force the installation (rpm --force) of the packages which have missing
files.
|
|
0
|
|
|
|
Reply
|
unruh-spam (2581)
|
5/23/2005 3:29:32 PM
|
|
On Mon, 23 May 2005 at 11:29 GMT, Michael Heiming wrote:
> In comp.os.linux.misc zeman <marckhayat@gmail.com>:
>> Hello all,
>> I'm using Linux RedHat Enterprise Edition, AS 3.0.
>> I mistakenly did:
>> rm -fr /usr/sbin instead of cd /usr/sbin
>
> Arghh, IIRC rh has a default alias rm = 'rm -i' or so which
> should hopefully prevent some disaster like this.
It is more likely to cause it. Using a standard command name for
other than its default behaviour is asking for trouble. See this
recent message from comp.unix shell for a good explanation of why:
<http://groups.google.se/groups?selm=11906oe5v2nmj58%40corp.supernews.com&output=gplain>
<http://tinyurl.com/9a8cy>
--
Chris F.A. Johnson <http://cfaj.freeshell.org>
==================================================================
Shell Scripting Recipes: A Problem-Solution Approach, 2005, Apress
<http://www.torfree.net/~chris/books/cfaj/ssr.html>
|
|
0
|
|
|
|
Reply
|
cfajohnson (1784)
|
5/23/2005 4:19:22 PM
|
|
zeman wrote:
> Hello all,
> I'm using Linux RedHat Enterprise Edition, AS 3.0.
> I mistakenly did:
> rm -fr /usr/sbin instead of cd /usr/sbin
> I know I can't recover the directory.
> I reinstalled the linux on another computer, but since the CDs weren't
> much ok, i only installed it as minimal. so the webserver (httpd) isn't
> working.
> I tried to reinstall the httpd.2-0.54 but not working...
>
> Can anyone with the same distribution send me a link to get the
> necessary file (httpd, apachectl...)
>
> Thanks,
Glad to hear that I am not alone in doing that. I had to run rm -rf on the
subdirectory usr/ , and out of habit typed /usr <ENTER>.
Doug.
--
ICQ Number 178748389. Registered Linux User No. 277548.
It's all right letting yourself go as long as you can let yourself back.
-- Mick Jagger.
|
|
0
|
|
|
|
Reply
|
laidlaws (529)
|
5/23/2005 6:00:45 PM
|
|
On 2005-05-23, Unruh <unruh-spam@physics.ubc.ca> wrote:
> "zeman" <marckhayat@gmail.com> writes:
>
>>Hello all,
>>I'm using Linux RedHat Enterprise Edition, AS 3.0.
>>I mistakenly did:
>>rm -fr /usr/sbin instead of cd /usr/sbin
>>I know I can't recover the directory.
>>I reinstalled the linux on another computer, but since the CDs weren't
>>much ok, i only installed it as minimal. so the webserver (httpd) isn't
>>working.
>>I tried to reinstall the httpd.2-0.54 but not working...
>
> rpm -Va|grep '^..5'
> will list for you all the files which are not the same as installed,
> including all the missing files.
You might also grep for "missing" (not certain about case).
IIRC, cases where a file is missing result in just "missing"
or "Missing", not something matching '^..5'.
> Note that it will also list configuration files. which you do not want to
> replace.
>
> You probably want
> rpm -Va|grep '^..5'|grep 'usr\/sbin'
> Which will tell you all of the files in /usr/sbin which have changed. Then
> force the installation (rpm --force) of the packages which have missing
> files.
This should catch the /usr/sbin discrepancies.
Alternatively, one can use fgrep and omit the backslash.
Another alternative for the OP would be to restore from
backups. Backups are a good thing. It is said there are
two kinds of people: those who have lost data, and those who
will lose data.
Robert Riches
spamtrap42@verizon.net
(Yes, that is one of my email addresses.)
|
|
0
|
|
|
|
Reply
|
spamtrap42 (1175)
|
5/23/2005 6:05:46 PM
|
|
On Mon, 23 May 2005 at 18:05 GMT, Robert M. Riches Jr. wrote:
> On 2005-05-23, Unruh <unruh-spam@physics.ubc.ca> wrote:
>>
>> You probably want
>> rpm -Va|grep '^..5'|grep 'usr\/sbin'
>> Which will tell you all of the files in /usr/sbin which have changed. Then
>> force the installation (rpm --force) of the packages which have missing
>> files.
>
> This should catch the /usr/sbin discrepancies.
> Alternatively, one can use fgrep and omit the backslash.
Or one can use grep and omit the backslash; the slash is not
special to the shell (or grep).
--
Chris F.A. Johnson <http://cfaj.freeshell.org>
==================================================================
Shell Scripting Recipes: A Problem-Solution Approach, 2005, Apress
<http://www.torfree.net/~chris/books/cfaj/ssr.html>
|
|
0
|
|
|
|
Reply
|
cfajohnson (1784)
|
5/23/2005 6:25:28 PM
|
|
"Robert M. Riches Jr." <spamtrap42@verizon.net> writes:
>On 2005-05-23, Unruh <unruh-spam@physics.ubc.ca> wrote:
>> "zeman" <marckhayat@gmail.com> writes:
>>
>>>Hello all,
>>>I'm using Linux RedHat Enterprise Edition, AS 3.0.
>>>I mistakenly did:
>>>rm -fr /usr/sbin instead of cd /usr/sbin
>>>I know I can't recover the directory.
>>>I reinstalled the linux on another computer, but since the CDs weren't
>>>much ok, i only installed it as minimal. so the webserver (httpd) isn't
>>>working.
>>>I tried to reinstall the httpd.2-0.54 but not working...
>>
>> rpm -Va|grep '^..5'
>> will list for you all the files which are not the same as installed,
>> including all the missing files.
>You might also grep for "missing" (not certain about case).
>IIRC, cases where a file is missing result in just "missing"
>or "Missing", not something matching '^..5'.
You are perfectly correct. You need to grep for "^missing"
not '^..5'. The latter only occurs if the file exists.
Eg
info[root]>mv zic zic.old
info[root]>rpm -V timezone
missing /usr/sbin/zic
Sorry for the confusion.
|
|
0
|
|
|
|
Reply
|
unruh-spam (2581)
|
5/23/2005 6:55:43 PM
|
|
In comp.os.linux.misc Chris F.A. Johnson <cfajohnson@gmail.com>:
> On Mon, 23 May 2005 at 11:29 GMT, Michael Heiming wrote:
>> In comp.os.linux.misc zeman <marckhayat@gmail.com>:
>>> Hello all,
>>> I'm using Linux RedHat Enterprise Edition, AS 3.0.
>>> I mistakenly did:
>>> rm -fr /usr/sbin instead of cd /usr/sbin
>>
>> Arghh, IIRC rh has a default alias rm = 'rm -i' or so which
>> should hopefully prevent some disaster like this.
> It is more likely to cause it. Using a standard command name for
> other than its default behaviour is asking for trouble. See this
> recent message from comp.unix shell for a good explanation of why:
> <http://groups.google.se/groups?selm=11906oe5v2nmj58%40corp.supernews.com&output=gplain>
> <http://tinyurl.com/9a8cy>
Ack, just tested out, don't use this alias anyway, but '-i' is
simply overwritten by 'rf'. Seems it's not that easy accidentally
using 'rm -rf' instead of 'cd ...', of course it can happen as
the example shows.
In any case a recent *full* *BACKUP* would have allowed to
recover in no time. Even if a working rpm db would alternatively
allow to check/reinstall '--force' packages again, using '-V' or
run the list provided against the rpm db and reinstall any
package you had out of my list which is from a full install +
patched RH ES 3.0 system.
--
Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo zvpunry@urvzvat.qr | perl -pe 'y/a-z/n-za-m/'
#bofh excuse 346: Your/our computer(s) had suffered a memory
leak, and we are waiting for them to be topped up.
|
|
0
|
|
|
|
Reply
|
USENET22 (5462)
|
5/23/2005 7:13:15 PM
|
|
In comp.os.linux.misc Chris <ithinkiam@gmail.com>:
> Michael Heiming wrote:
>> In comp.os.linux.misc zeman <marckhayat@gmail.com>:
>>>Hello all,
>>>I'm using Linux RedHat Enterprise Edition, AS 3.0.
>>>I mistakenly did:
>>>rm -fr /usr/sbin instead of cd /usr/sbin
>>
>> Arghh, IIRC rh has a default alias rm = 'rm -i' or so which
>> should hopefully prevent some disaster like this.
>>
> Unfortunately the -f switch over-rides the -i switch :-(
Indeed, just tested.;( Never use this default RH alias...
--
Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo zvpunry@urvzvat.qr | perl -pe 'y/a-z/n-za-m/'
#bofh excuse 443: Zombie processes detected, machine is haunted.
|
|
0
|
|
|
|
Reply
|
USENET22 (5462)
|
5/23/2005 7:15:08 PM
|
|
|
11 Replies
48 Views
(page loaded in 0.463 seconds)
Similiar Articles: /usr/sbin/quota causes login delay - comp.unix.solarisWhen I log in, I get a delay and I have determined that /usr/sbin/quota is the culprit. Other descriptions in this newsgroup of the same problem indicate that remote NFS ... Max number of groups in NIS - comp.unix.solaris... this problem for quite along time but without seeing any problems, what does it mean is there a limitation or not ? bash-3.00# /usr/ccs/bin/make /usr/sbin ... NTP Autokey problem - comp.protocols.time.ntp- Run=20 /usr/sbin/ntpd -c ntp.conf -l log=20 and wait until the server gets ... nptq -p slowness - comp.protocols.time.ntp Problem solved: Bravo Ronan, thank you ... ZFS web gui - comp.unix.solarisWhen I start the listener manually using the command "/usr/sbin/smcwebserver start ... On an earlier install I could access the interface with no problems but something was ... mount: RPC: Authentication error; why = Failed (unspecified error ...As suggested in a posting about another RPC-related problem: > /root#/usr/sbin/exportfs -v > /opt/ltsp <world>(ro,async,wdelay,no_root_squash,no_subtree ... Weirdest ever TFTP problem! - comp.unix.solaris... 03# grep tftp /etc/inetd.conf tftp dgram udp6 wait root /usr/sbin/in ... thanks for asking- Unfortunately I never figured out the real root of the problem. showmount says "RPC: Program not registered" - comp.unix.solaris ...... comp.unix.solaris ... showmount says "RPC: Program not registered" - comp.unix.solaris ..... root_squash,no_subtree_check) Also, #/usr/sbin/showmount ... mount problem ... socket in use ? - comp.protocols.time.ntpAfter running for a while without problems, I now get this result; linux:~ # /usr/sbin/ntpdate -v ntp1.sda.t-online.de 6 May 01:49:09 ntpdate[28990]: ntpdate 4.1.1@1 ... differences between /bin, /usr/bin and /usr/local/bin - comp.unix ...Should be available in case of problem when one needs to boot into single user ... downloads/index.jsp > > > #echo $PATH /usr/sfw/sbin:/usr/sfw/bin:/sbin:/bin:/usr/sbin ... How to configure Lots of local loop back IP address on solaris box ...... it stop after creating 255 i.e lo0:255. #/usr/sbin/ifconfig lo0:256 plumb ifconfig: plumb: SIOCLIFADDIF: lo0:256: no such interface how should i solve this problem. open failed: illegal insecure pathname - comp.unix.solaris ...... select_preload.so: open >> failed: illegal insecure pathname > > problem here is prtconf which is actually a setgid executable (64-bit > version): > > ls -l /usr/sbin ... mount problem - RPC program not registered. - comp.unix.solaris ...0:00 /usr/sbin/rpcbind Can you mount that server's shares from other client hosts? ... NFS mount problem - comp.unix.solaris NFS mount problem - comp.unix.solaris NFS ... /usr/local/bin/stty: not found - comp.lang.tclI have searched and found this problem many times on the Internet, but without ... what I found: I grabbed the coolstack_src_x86.tar package.. #cd src ... sfw/sbin:/usr ... ifconfig RX packets errors - comp.os.linux.misc#/usr/sbin/ethtool -s eth0 autoneg off duplex full speed 100 Before I run this command ... also noticed that "Advertised link modes: Not reported". Will it cause any problem ?. Solaris 8: Unable to login - comp.unix.solaris0:00 /usr/sadm/lib/smc/bin/smcboot Can anyone suggest what could be the problem and ... 0:00 /usr/sbin/inetd -s > root 177 1 0 Aug 06 ? 20:30 /usr/local/sbin/named ... *** glibc detected *** /usr/sbin/httpd: malloc(): memory ...Hi All, I am having a problem in my Apache Server (RHEL5).Where apache server stops responding suddenly and when restarted httpd it starts working.It /usr/sbin/repquota problems - cPanel ForumsEach night at 2am the process /usr/sbin/repquota runs and uses 99% of the CPU. What is this process? 7/30/2012 1:42:35 PM
|