LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-27-2004, 03:30 AM   #1
woja
LQ Newbie
 
Registered: Nov 2003
Location: New Zealand
Distribution: redhat 9
Posts: 20

Rep: Reputation: 0
usage of rpm command


Hi,

I am using redhat 9. I made some stupid changes late at night to smb.conf, not really knowing what I was doing, without making a backup, and need to start over. How do I replace the copy in etc/samba with the original from on the installation CDs? I know it's something to do with the rpm command. I've looked at "man rpm" and can't make sense of it.

Thanks,
Roger
 
Old 01-27-2004, 04:17 AM   #2
huibert.alblas
Member
 
Registered: Jan 2004
Location: Duesseldorf /Germany
Distribution: Gentoo amd64 / Debian
Posts: 226

Rep: Reputation: 30
If you only nned the orginal smb.conf,
the easyest way is to locate the samba.common (?) package on your install CD's.
With the use of the mc in a terminal (midnight commander) you can easaly access the rpm contents, just like a zip file.

navigate to the etc/samaba/smb.conf file and copy it to a convinient location.

The midnight commander ist a very helpfull tool for tasks like extracting one or two files from an archive.

Have fun!

Pankrat
 
Old 01-27-2004, 11:27 AM   #3
woja
LQ Newbie
 
Registered: Nov 2003
Location: New Zealand
Distribution: redhat 9
Posts: 20

Original Poster
Rep: Reputation: 0
Thanks for your help, I'm making progress but stuck again.

I can locate the samba.common.2.2.7a-7.9.0.i386.rpm file using midnight commander. I can copy the file to another location with no problems. I don't see how to view the contents of the rpm file itself, either in mc or konqueror. What do I need to do now?

Roger
 
Old 01-27-2004, 11:44 AM   #4
Netizen
Member
 
Registered: Sep 2003
Location: Texas
Distribution: Slackware and Ubuntu
Posts: 355

Rep: Reputation: 30
You are prolly going to have to install the rpm. That will extract files you need to the folders and should overwrite everything.

Netizen
 
Old 01-30-2004, 04:32 AM   #5
huibert.alblas
Member
 
Registered: Jan 2004
Location: Duesseldorf /Germany
Distribution: Gentoo amd64 / Debian
Posts: 226

Rep: Reputation: 30
The following maybe is a little to detailed,
I just wanted to make clear the concept of virtual file systems in MC
(works the same in a lot of other tools too)

In the MC (on the 'left-side') :
navigate to the rpm using the cursor keys,
and enter key to access a directory. (this is common sense,
you probably knew this allready.)

This is so simple, you are probaly not consiously aware that it works that way.

Now, the beauty of the MC is;

you can access ZIP, TAR, RPM, CPIO and loads of other files just in the same way as you enter directories.
(The only caveat is, that you should make sure the file you want to 'enter' is not flagged as executable (marked green and a * in MC)
otherwise MC will convienetly try to execute said file. For RPMS this will result in an error)

To retrive one (1) file from an RPM (or other encapsulated format)
you navigate to the file, and press the enter key on this file.

this should show you the contents off the RPM file.

you will see 2 directories (/etc and /usr) and some RPM internal information files (you can ignore these)

in the RPM you navigate to /etc/samba/smb.conf, now on the right side of MC, you go to (for instance) /tmp.
Now you change back to the left side with the TAB key, and press F5 (copy file)

Thats it, now you have the orignal smb.conf lying around in /tmp.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I get the rpm command and rpm build command on my Debian box? abefroman Debian 6 11-28-2005 12:38 PM
RPM usage to upgrade file system prital Linux - Software 3 10-11-2005 02:12 AM
RPM Usage waelaltaqi Linux - Software 4 10-08-2005 01:56 PM
how to determine cpu usage, memory usage, I/O usage by a particular user logged on li rags2k Programming 4 08-21-2004 04:45 AM
rm command usage big_orange Linux - General 3 11-04-2003 04:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration