home *** CD-ROM | disk | FTP | other *** search
/ ftp.jcu.edu.au / 2014.06.ftp.jcu.edu.au.tar / ftp.jcu.edu.au / v6.3.2b / SWBD63 / fabos-6.3.2b-10.ppc.rpm / fabos-6.3.2b.10.cpio.gz / fabos-6.3.2b.10.cpio / sbin / securitydisable < prev    next >
Text File  |  2010-11-10  |  1KB  |  44 lines

  1. #!/bin/sh
  2. #
  3. #    Copyright (c) 2003 Brocade Communications Systems, Inc.
  4. #    All rights reserved.
  5. #
  6. #    File name:   logout
  7. #    Module name: fabos/src/security/utils.c
  8. #
  9. #    This script will logout all sessions of specified particular users.
  10. #    It's called by the in a number of situtaions in secure mode
  11. #    by the FABOS code such as when passwords change or FCS role
  12. #    change.
  13. #
  14. export PATH=/fabos/sbin:/fabos/bin:/bin:/usr/bin:/sbin
  15.  
  16. chkstring=`ls /proc`
  17.  
  18. if [ "$chkstring" != "" ]
  19. then
  20.     echo This is a recovery command that can only be run in single user mode.
  21.     exit -1
  22. fi
  23.  
  24. cd /etc/fabos
  25.  
  26. # For loop will disable security on all logical switches by changing sec.mode
  27. # value in config file to 0.
  28. for conf_file in `ls -1 fabos.*.conf`
  29. do
  30.     if [ "$conf_file" != "fabos.chassis.conf" ]
  31.     then
  32.         sed 's/sec.mode:.*/sec.mode:0/g' $conf_file > /tmp/$conf_file
  33.         mv /tmp/$conf_file $conf_file
  34.     fi
  35. done
  36.  
  37. # Save config file on the secondary partition
  38. cp /etc/fabos/fabos.*.conf /mnt/etc/fabos
  39.  
  40. # Remove binary files in case they're corrupted.  The security daemon
  41. # will create a new file during startup.
  42. rm /etc/fabos/*.secdb
  43. rm /mnt/etc/fabos/*.secdb
  44.