diff --git a/clientside/tmcc/common/config/rc.mkelab b/clientside/tmcc/common/config/rc.mkelab index e9022b70d57e7ed64adfeb3059911674d6c179f6..3ffa0073d21abafc4bf6f148e690e19151371296 100755 --- a/clientside/tmcc/common/config/rc.mkelab +++ b/clientside/tmcc/common/config/rc.mkelab @@ -2002,6 +2002,9 @@ sub SetupBossNode($) # Copy over creators ssl certificate for XMLRPC. See below. mysystem("cp -fp ~${creator}/.ssl/emulab.pem $stuffdir"); + # Copy extra ssh pub key for adding to elabman. + mysystem("cp -fp ~${creator}/.ssh/elabinelab.pub $stuffdir") + if (-e "/users/${creator}/.ssh/elabinelab.pub"); # # Write the config variables out. genirack install phase needs it. @@ -2484,6 +2487,10 @@ sub SetupBossNode($) mysystem("/etc/rc.sendmail start"); } + # Copy additional key into the install directory. + mysystem("cp -fp $stuffdir/elabinelab.pub $TBDIR/src/testbed/install") + if (-e "$stuffdir/elabinelab.pub"); + # # INNER OPS DEPENDENCY: boss-install eventually wants to NFS mount # the filesystems on ops/fs, so at this point the ops/fs filesystems diff --git a/install/phases/boss/firstuser b/install/phases/boss/firstuser index d3aef09ad36af043c00846a20432279bfd3737db..51ad453060926c3601f8cd37256dee0ee1d43014 100755 --- a/install/phases/boss/firstuser +++ b/install/phases/boss/firstuser @@ -5,6 +5,8 @@ use strict; use libinstall; use installvars; +my $EXTRADSA_KEY = "$main::TOP_SRCDIR/install/elabinelab.pub"; + sub Install($$$) { my ($server, $isupdate, $impotent) = @_; @@ -68,6 +70,13 @@ sub Install($$$) ExecQuietFatal("$SUDO -u $PROTOUSER $WAP ". " $ADDPUBKEY -f -u $PROTOUSER $PROTOUSER_KEY"); }; + Phase "DSAKey2", "Adding Extra DSA key to $PROTOUSER account", sub { + PhaseSkip("No key found") + if (! -e $EXTRADSA_KEY); + + ExecQuietFatal("$SUDO -u $PROTOUSER $WAP ". + " $ADDPUBKEY -R -f -u $PROTOUSER $EXTRADSA_KEY"); + }; Phase "authkeys", "Generating authorized_keys for $PROTOUSER", sub { ExecQuietFatal("$SUDO -u $PROTOUSER $WAP $ADDPUBKEY -w $PROTOUSER"); };