Solved

Removing the sendmail package entries

Posted on 2004-09-29
13
374 Views
Last Modified: 2013-12-27
The System: Solaris v2.8 w/MU #7 and Recommended Patches from July, 2004; running in SS20

The Issue: When the system was installed, the Solaris v8 sendmail packages were installed by default. I have since installed my own sendmail installation (since v8 ships with sendmail v8.11, which is horribly out-of-date). However, much to my chagrin, when I last applied a Recommended Patches set, it happily overwrote my pristine installation of sendmail v8.12.11 with the older garbage from Sun. All it took to fix was to re-run the sendmail install, but it was still very annoying.

I have identified the package names for sendmail (SUNWsndmr and SUNWsndmu).

1) Can I use pkgrm to remove these without damaging/deleting the sendmail install that I performed?

2) If the answer to 1) is "No", then how can I delete the information that tells a Recommended Patches install script that those packages are installed, so it'll skip any patches to those packages? Can I just delete some lines from some file listing the installed packages? Where?
0
Comment
Question by:PsiCop
  • 5
  • 4
  • 2
  • +1
13 Comments
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
No. But you can save a copy of /etc/mail, remove the Sun packages, reinstall Sendmail, and restore.
0
 
LVL 34

Author Comment

by:PsiCop
Comment Utility
If I remove the Sun packages, what exactly is removed?
0
 
LVL 18

Expert Comment

by:liddler
Comment Utility
PsiCop,
Try
 pkgchk -l SUNWsndmu |grep Pathname
&
 pkgchk -l SUNWsndmr |grep Pathname
to get a list of the files installed / modified by the package, you then might have to mess about with cut / sed or manually edit the list to remove directories that are only affected like /ust/sbin etc
0
 
LVL 34

Author Comment

by:PsiCop
Comment Utility
Ah.

Is there anyway to get at the DB that the pkg* tools use and simply delete the entries for SUNWsndmu and SUNWsndmr? I'm thinking if I do that, I won't have to worry about a cluster instal script clobbering me.
0
 
LVL 18

Expert Comment

by:liddler
Comment Utility
don't think so....
0
 
LVL 34

Author Comment

by:PsiCop
Comment Utility
Well, as it happened, I went looking at the man pages for the pkg* utilities.

On the page for pkgadd, I found a reference to the directory /var/sadm/install. Checking out the directory, I found the file "contents", which has stuff in it like this:

<SNIP>
/usr/lib/sendmail f none 4555 root bin 761388 52703 1081447323 SUNWsndmu
/usr/lib/smrsh f none 0555 root bin 8012 453 1081447323 SUNWsndmu
/usr/sbin d none 0755 root bin SUNWesu SUNWfns SUNWatfsu SUNWgss SUNWpsu SUNWsadmi SUNWtcxow SUNWbnuu SUNWcpcu SUNWdialh SUNWswmt SUNWaccu SUNWluxop SUNWftpu SUNWsutl SUNWntpu SUNWadmfw SUNWpmu SUNWocf SUNWsasnm SUNWpcu SUNWnisu SUNWadmap SUNWinst SUNWsndmu SUNWauda SUNWcsu SUNWvolu
/usr/sbin/etrn f none 0555 root bin 4453 13596 1081426484 SUNWsndmu
/usr/sbin/makemap f none 0555 root bin 310036 50664 1081447323 SUNWsndmu
<SNIP>

Along with entries concerning a LOT of other packages, including ones I installed myself (e.g. gcc).

Anyway, that seems to me to be the "database" (its a flat text file) of packages installed on the system. Can I just delete the entries concerning SUNWsndmu and SUNWsndmr and thereby "trick" the system into thinking that sendmail is not installed?
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 18

Expert Comment

by:liddler
Comment Utility
possibly, I've never tried, but I remember doing something similar in osf on a DEC machine years ago.......
Best thing to to is make a copy of the file, delete (or maybe comment out) a line for a package you have a patch for, then try and install the patch
0
 
LVL 34

Author Comment

by:PsiCop
Comment Utility
*nods* Always make a backup! :-)
0
 
LVL 34

Author Comment

by:PsiCop
Comment Utility
After some consultation with a guy from Sun, I've confirmed that /var/sadm/install/contents is the "database" that the pkg* and patch* tools use to determine what packages are installed on the system. It is safe to edit this file to remove references to a package that you don't want patched in the future.

Another, perhaps safer, method, would be to edit the "patch_order" file in a given Recommended Patches cluster and remove any patches that you don't want applied. The issue I have with this solution is that if you miss one, you're hosed.

I'm going to ask that this Question be PAQed and my points refunded since I solved it on my own. But I appreciate, as always, your inputs, jlevie and liddler.
0
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
PAQ is fine with me
0
 
LVL 18

Expert Comment

by:liddler
Comment Utility
OK with me
0
 

Accepted Solution

by:
ee_ai_construct earned 0 total points
Comment Utility
Question answered by asker or dialog valuable.
Closed, 250 points refunded.
ee_ai_construct (replacement part #xm34)
Community Support Admin
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now