Technical article 105336

How do I grep the software "perms list" for SCO OpenServer Release 5.0?

OpenServer 5.0.0OpenServer 5.0.2

Written · Last revised

Problem

I want to know the characteristics of operating system file(s),
such as permissions, owner, group, links, checksum, and so on.
How do I grep the software "perms list" for SCO OpenServer
Release 5.0?  I am used to the perms files in previous releases
of SCO, and the utilities that operate from them, such as custom(ADM),
fixperm(ADM), sysadmsh(ADM).  Even though I still do see perms
files in /etc/perms, I understand that these are primarily for
historical/legacy purposes, and that the new utilities such as
the new custom(ADM), customextract(ADM), scoadmin(ADM) use a new
set of "perms" files.

Cause

The method and structure for maintaining the list of files for the products has changed beginning with SCO OpenServer Release 5.

Solution

The closest relation to /etc/perms/* in Release 5.0.0 are the ".fl" files in:

/opt/K/SCO/*/*/.softmgmt/*.fl
-and-
/var/opt/K/SCO/*/*/.softmgmt/*.fl

You can grep these if you use a shell script like this:

:
# "grepperms" - grep custom+ .fl files
grep $1 /opt/K/SCO/*/*/.softmgmt/*.fl
grep $1 /var/opt/K/SCO/*/*/.softmgmt/*.fl

The following is a sample run (lines may wrap differently on your terminal):

# ./grepperms xtod
/opt/K/SCO/Unix/5.0.0Cl/.softmgmt/RTS.fl:FILE 0711 root root
    1 3028 618803777 - - - 0 0 ./usr/bin/xtod
/opt/K/SCO/Unix/5.0.0Cl/.softmgmt/RTS.fl:EXPORT r
    ./usr/bin/xtod /usr/bin/xtod

/opt/K/SCO/Unix/5.0.0Cl/.softmgmt/UNIX_DOC.fl:FILE 0644 bin bin 1 917 2084534891 - - - 0 0 ./man/html.C/xtod.C.html.Z

# sum -lr /usr/bin/xtod
0618803777     6 /usr/bin/xtod

The file, /opt/K/SCO/Unix/5.0.0Cl/.softmgmt/usr/bin/xtod, is symbolically linked to /usr/bin/xtod, has permissions 0711, owner root, group root, and the sum -lr checksum is 0618803777.

You will need to make a shell script, but in return you will get at least one new piece of information (the sum -lr checksum). It seems to run about as fast as the old grep did.

After locating the file with the grepperms technique, you can use 'customextract(ADM)' to restore from installation media:

# ls -l /usr/bin/xtod
lrwxrwxrwx 1 root root 36 May  8 06:15
    /usr/bin/xtod -> /opt/K/SCO/Unix/5.0.0Cl/usr/bin/xtod
# customextract -m /dev/<installmedia> /opt/K/SCO/Unix/5.0.0Cl/usr/bin/xtod

See also

man pages: fixperm(C), custom(ADM), sysadmsh(ADM),
customextract(ADM), scoadmin(ADM), scoadmin(F)

From the Xinuos technical article database, record 105336. Reproduced with permission. The original is at www.sco.com/ta/105336, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.