Changeset 2575 for trunk/server/common/oursrc
- Timestamp:
- Aug 24, 2014, 11:29:04 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server/common/oursrc/accountadm/signup-scripts-backend.in
r2101 r2575 1 1 #!/usr/bin/perl 2 2 use strict; 3 use File::Temp qw/ :POSIX /; 3 4 4 5 # signup-scripts-backend … … 102 103 } 103 104 105 # Get credentials 106 my $ccache = tmpnam(); 107 $ENV{'KRB5CCNAME'} = $ccache; 108 my $exit_status = system("/usr/bin/kinit", "-k", "-t", "/etc/signup.keytab", "daemon/scripts-signup.mit.edu"); 109 if (($exit_status >> 8) != 0) { 110 die "Couldn't get Kerberos credentials for account creation!"; 111 } 104 112 my $pid; 113 my @ldap_servers = ('doppelganger', 'alter-ego', 'body-double'); 114 my $selected_server = $ldap_servers[int(rand(3))]; 105 115 defined ($pid = open LDAP, '|-') or complain("internal error"); 106 116 if (!$pid) { 107 117 close STDOUT; 108 118 open STDOUT, '>/dev/null'; 109 exec '@ldapadd_path@', '-c', '- x', '-D', 'cn=Directory Manager', '-y', '/etc/signup-ldap-pw';119 exec '@ldapadd_path@', '-c', '-Y', 'gssapi', '-H', "ldap://$selected_server.mit.edu"; 110 120 exit 1; 111 121 } … … 145 155 #system('@sudo_path@', '-u', 'root', '/usr/sbin/setquota', $username, '0', '25000', '0', '10000', '-a'); 146 156 157 system("kdestroy"); 158 147 159 printexit("done", 0); 148 160
Note: See TracChangeset
for help on using the changeset viewer.