Tool
Bash Script to read / collect trustees and inherited rights filter across multiple folder trees:
#OS : Open Enterprise Server 2 / SP1 or newer with Cluster Services
--require: included bash script 'read-rights.sh' --or-- in clustered env called 'read_nss_rights_to_folder' ; 'pdfvonascii'
---rpm packages:realpath-1.11-4.7; enscript; ghostscript-library-8.15.3-18.13 (SLES10)
Usage:
#reads-rights.sh
-fill the variables 'root_path' & 'dir_path' with folder(s) which you walk thru, 'dir_file_path' & 'dir_file_tmp_path' for output an temp / working folder
--> read & collect nss trusstes from multiple folder and thier child's
>>collected this page you can look up ASCII characters and descriptions.">ASCII output convert to separate PDF file and write down in chronological order to an folder on any destination path <<
##############################################################################
#clustered env to run with cron:
1.) create on cluster resource/volume new path structure:
e.g. '/media/nss/DATA/system'
|-- etc
| |-- cron.d
| `-- sysconfig
|-- tmp
|-- usr
| `-- local
| `-- sbin
`-- var
`-- spool
`-- tmp
2.) put files in folders...
|-- etc
| |-- cron.d
| `-- read_nss_rights_to_folder #file 1 with crontab entry #
| `-- sysconfig
| `-- read_nss_rights_to_folder #file 2 with variable for file3#
|-- tmp
|-- usr
| `-- local
| `-- sbin
| `-- read_nss_rights_to_folder #file 3 script#
`-- var
`-- spool
`-- tmp
3.) modify cluster resource, load/unload script :
#load script
#################################################################
# Start extra Services associated with clustered NCP Pool/Volume#
#################################################################
MOUNT_POINT=/media/nss/DATA
SYS_PATH=$MOUNT_POINT/system
#################################################################
## script 'read_nss_rights_to_folder'
##read nss FS Trustee Rights and write the output to dedicated ##PDF-File in specified Folder...
#################################################################
## startscript to configure /etc/cron.d/read_nss_rights_to_folder
#################################################################
/usr/bin/test -f $SYS_PATH/etc/cron.d/read_nss_rights_to_folder && /bin/cp $SYS_PATH/etc/cron.d/read_nss_rights_to_folder /etc/cron.d/
/usr/bin/test -f /etc/cron.d/read_nss_rights_to_folder && /bin/chmod 640 /etc/cron.d/read_nss_rights_to_folder
#################################################################
#unload script / ! prior 'ncp.. stuff'
#################################################################
## stopscript to unconfigure /etc/cron.d/read_nss_rights_to_folder
#################################################################
if [ -f /etc/cron.d/read_nss_rights_to_folder ]; then
/bin/rm /etc/cron.d/read_nss_rights_to_folder
fi
#################################################################
ready...check function :-)
| Fichier attaché | Taille |
|---|---|
| read_nss.tgz | 6.51 KB |
Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).
It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.
Related Articles
User Comments
- Be the first to comment! To leave a comment you need to Login or Register
- 6553 reads


0