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/*.flYou 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/*.flThe 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/xtodThe 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)