Annotation of loncom/build/setup_rpm_binaryroot.pl, revision 1.1
1.1 ! harris41 1: #!/usr/bin/perl
! 2:
! 3: # The LearningOnline Network with CAPA
! 4: # setup_rpm_binaryroot.pl - script to generate files to make LON-CAPA-setup rpm
! 5: #
! 6: # $Id$
! 7: #
! 8: # Written by Scott Harrison, harris41@msu.edu
! 9: #
! 10: # Copyright Michigan State University Board of Trustees
! 11: #
! 12: # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
! 13: #
! 14: # LON-CAPA is free software; you can redistribute it and/or modify
! 15: # it under the terms of the GNU General Public License as published by
! 16: # the Free Software Foundation; either version 2 of the License, or
! 17: # (at your option) any later version.
! 18: #
! 19: # LON-CAPA is distributed in the hope that it will be useful,
! 20: # but WITHOUT ANY WARRANTY; without even the implied warranty of
! 21: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! 22: # GNU General Public License for more details.
! 23: #
! 24: # You should have received a copy of the GNU General Public License
! 25: # along with LON-CAPA; if not, write to the Free Software
! 26: # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! 27: #
! 28: # http://www.lon-capa.org/
! 29: #
! 30: # YEAR=2002
! 31: # 1/9 - Scott Harrison
! 32: #
! 33: ###
! 34:
! 35: `install -d SetupBinaryRoot`;
! 36:
! 37: # /etc/passwd
! 38:
! 39: open OUT,">SetupBinaryRoot/etc/passwd";
! 40: print OUT<<END;
! 41: root::0:0:root:/root:/bin/bash
! 42: bin:!!:1:1:bin:/bin:
! 43: daemon:!!:2:2:daemon:/sbin:
! 44: adm:!!:3:4:adm:/var/adm:
! 45: lp:!!:4:7:lp:/var/spool/lpd:
! 46: sync:!!:5:0:sync:/sbin:/bin/sync
! 47: shutdown:!!:6:0:shutdown:/sbin:/sbin/shutdown
! 48: halt:!!:7:0:halt:/sbin:/sbin/halt
! 49: mail:!!:8:12:mail:/var/spool/mail:
! 50: news:!!:9:13:news:/var/spool/news:
! 51: uucp:!!:10:14:uucp:/var/spool/uucp:
! 52: operator:!!:11:0:operator:/root:
! 53: games:!!:12:100:games:/usr/games:
! 54: gopher:!!:13:30:gopher:/usr/lib/gopher-data:
! 55: ftp:!!:14:50:FTP User:/home/ftp:
! 56: nobody:!!:99:99:Nobody:/:
! 57: www:!!:500:500:www:/home/www:/bin/bash
! 58: END
! 59: close OUT;
! 60:
! 61: # /etc/group
! 62:
! 63: open OUT,">SetupBinaryRoot/etc/group";
! 64: print OUT<<END;
! 65: root::0:root
! 66: bin::1:root,bin,daemon
! 67: daemon::2:root,bin,daemon
! 68: sys::3:root,bin,adm
! 69: adm::4:root,adm,daemon
! 70: tty::5:
! 71: disk::6:root
! 72: lp::7:daemon,lp
! 73: mem::8:
! 74: kmem::9:
! 75: wheel::10:root
! 76: mail::12:mail
! 77: news::13:news
! 78: uucp::14:uucp
! 79: man::15:
! 80: games::20:
! 81: gopher::30:
! 82: dip::40:
! 83: ftp::50:
! 84: nobody::99:
! 85: users::100:
! 86: www::500:
! 87: END
! 88: close OUT;
! 89:
! 90: # /etc/hosts.deny
! 91:
! 92: open OUT,">SetupBinaryRoot/etc/hosts.deny";
! 93: print OUT<<END;
! 94: ALL: ALL
! 95: END
! 96: close OUT;
! 97:
! 98: # /home/www
! 99:
! 100: `install -o www -g users -m 0700 -d SetupBinaryRoot/home/www`;
! 101:
! 102: # /etc/pam.d
! 103:
! 104: `install -d SetupBinaryRoot/etc/pam.d`;
! 105:
! 106: # /etc/pam.d/passwd
! 107:
! 108: open OUT,">SetupBinaryRoot/etc/pam.d/passwd";
! 109: print OUT<<END;
! 110: #%PAM-1.0
! 111: auth required /lib/security/pam_pwdb.so shadow nullok
! 112: account required /lib/security/pam_pwdb.so
! 113: password required /lib/security/pam_cracklib.so retry=3
! 114: password required /lib/security/pam_pwdb.so use_authtok nullok
! 115: END
! 116: close OUT;
! 117:
! 118: # /etc/pam.d/login
! 119:
! 120: open OUT,">SetupBinaryRoot/etc/pam.d/login";
! 121: print OUT<<END;
! 122: #%PAM-1.0
! 123: auth required /lib/security/pam_securetty.so
! 124: auth required /lib/security/pam_pwdb.so shadow nullok
! 125: auth required /lib/security/pam_nologin.so
! 126: account required /lib/security/pam_pwdb.so
! 127: password required /lib/security/pam_cracklib.so
! 128: password required /lib/security/pam_pwdb.so nullok use_authtok
! 129: session required /lib/security/pam_pwdb.so
! 130: session optional /lib/security/pam_console.so
! 131: END
! 132: close OUT;
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>