Hello, The user is not created as indicated in these lines: |6988|43249:11851|new| /usr/bin/ssh -i /etc/vcl/vcl.key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectionAttempts=1 -o ConnectTimeout=3 -l root -p 22 -x cmp2 '/usr/sbin/useradd -d /home/admin -m -g admin admin' 2>&1 |6988|43249:11851|new| returning (6, "useradd: group 'admin' does no...")
Older versions of the Ubuntu.pm OS module added "-g admin" to the useradd command for some reason. This has been corrected in more recent versions. To fix the problem, I think you should be able to just add a group named "admin" to the image you're capturing. If this doesn't work, you could try to modify the Ubuntu.pm file. Find the line containing "-g admin" and remove this section of the command. -Andy On Tue, May 27, 2014 at 8:39 AM, Evelio Quiros <[email protected]> wrote: > Hello Andy & Josh, > > Yes, the password is not set because the user cannot be added when the > reservation is made. > Is there something special I needed to set when I first captured the > Ubuntu Image ? > > Here is a snippet of the vcld log: > > 2014-05-27 > 08:22:51|6988|43249:11851|new|OS.pm:get_ip_address(1448)|public interface > assigned a single IP address, returning 10.106.129.167 > 2014-05-27 > 08:22:51|6988|43249:11851|new|OS.pm:update_public_ip_address(839)|retrieved > public IP address from cmp2 using the OS module: 10.106.129.167 > 2014-05-27 > 08:22:51|6988|43249:11851|new|DataStructure.pm:_automethod(836)|data > structure updated, hash path: > $self->request_data->{reservation}{11851}{computer}{IPaddress}, data > identifier: computer_ip_address, data: > |6988|43249:11851|new| : "10.106.129.167" > 2014-05-27 > 08:22:51|6988|43249:11851|new|utils.pm:update_computer_address(5888)|computer > 14 IP address 10.106.129.167 updated in database > 2014-05-27 > 08:22:51|6988|43249:11851|new|OS.pm:update_public_ip_address(857)|updated > dynamic public IP address in computer table for cmp2, 10.106.129.167 > 2014-05-27 08:22:51|6988|43249:11851|new|utils.pm:insertloadlog(3703)|inserted > computer=14, dynamicDHCPaddress, updated dynamic public IP address in > computer table for cmp2, 10.106.129.167 > 2014-05-27 08:22:51|6988|43249:11851|new|utils.pm:insertloadlog(3703)|inserted > computer=14, info, node ready adding user account > 2014-05-27 > 08:22:51|6988|43249:11851|new|utils.pm:update_request_password(1788)|password > updated for reservation_id 11851 > 2014-05-27 08:22:51|6988|43249:11851|new|new.pm:reserve_computer(952)|updated > password in the reservation table > 2014-05-27 > 08:22:51|6988|43249:11851|new|DataStructure.pm:_automethod(836)|data > structure updated, hash path: > $self->request_data->{reservation}{11851}{pw}, data identifier: > reservation_password, data: > |6988|43249:11851|new| : "LEkyJc" > 2014-05-27 08:22:51|6988|43249:11851|new|new.pm:reserve_computer(967)|calling > OS module's reserve() subroutine > 2014-05-27 08:22:51|6988|43249:11851|new|Ubuntu.pm:reserve(164)|Enterered > reserve() in the Ubuntu OS module > 2014-05-27 > 08:22:51|6988|43249:11851|new|utils.pm:run_ssh_command(4935)|executing > SSH command on cmp2: > |6988|43249:11851|new| /usr/bin/ssh -i /etc/vcl/vcl.key -o > StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o > ConnectionAttempts=1 -o ConnectTimeout=3 -l root -p 22 -x cmp2 > '/usr/sbin/useradd -d /home/admin -m -g admin admin' 2>&1 > 2014-05-27 08:22:51|19132|vcld:main(167)|lastcheckin time updated for > management node 2: 2014-05-27 08:22:51 > 2014-05-27 > 08:22:51|6988|43249:11851|new|utils.pm:run_ssh_command(5053)|run_ssh_command > output: > |6988|43249:11851|new| useradd: group 'admin' does not exist > 2014-05-27 08:22:51|6988|43249:11851|new|utils.pm:run_ssh_command(5063)|SSH > command executed on cmp2, command: > |6988|43249:11851|new| /usr/bin/ssh -i /etc/vcl/vcl.key -o > StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o > ConnectionAttempts=1 -o ConnectTimeout=3 -l root -p 22 -x cmp2 > '/usr/sbin/useradd -d /home/admin -m -g admin admin' 2>&1 > |6988|43249:11851|new| returning (6, "useradd: group 'admin' does no...") > 2014-05-27 > 08:22:51|6988|43249:11851|new|utils.pm:run_ssh_command(4935)|executing > SSH command on cmp2: > |6988|43249:11851|new| /usr/bin/ssh -i /etc/vcl/vcl.key -o > StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o > ConnectionAttempts=1 -o ConnectTimeout=3 -l root -p 22 -x cmp2 'echo > admin:LEkyJc | chpasswd' 2>&1 > 2014-05-27 > 08:22:51|6988|43249:11851|new|utils.pm:run_ssh_command(5053)|run_ssh_command > output: > |6988|43249:11851|new| chpasswd: (user admin) pam_chauthtok() failed, > error: > |6988|43249:11851|new| Authentication token manipulation error > |6988|43249:11851|new| chpasswd: (line 1, user admin) password not changed > 2014-05-27 08:22:51|6988|43249:11851|new|utils.pm:run_ssh_command(5063)|SSH > command executed on cmp2, command: > |6988|43249:11851|new| /usr/bin/ssh -i /etc/vcl/vcl.key -o > StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o > ConnectionAttempts=1 -o ConnectTimeout=3 -l root -p 22 -x cmp2 'echo > admin:LEkyJc | chpasswd' 2>&1 > |6988|43249:11851|new| returning (1, "chpasswd: (user admin) pam_cha...") > 2014-05-27 > 08:22:51|6988|43249:11851|new|Ubuntu.pm:changepasswd(450)|changed password > for account: admin > 2014-05-27 > 08:22:51|6988|43249:11851|new|utils.pm:run_ssh_command(4935)|executing > SSH command on cmp2: > |6988|43249:11851|new| /usr/bin/ssh -i /etc/vcl/vcl.key -o > StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o > ConnectionAttempts=1 -o ConnectTimeout=3 -l root -p 22 -x cmp2 'sed -i -e > "/^admin .*/d" /etc/sudoers' 2>&1 > 2014-05-27 > 08:22:52|6988|43249:11851|new|utils.pm:run_ssh_command(5053)|run_ssh_command > output: > 2014-05-27 08:22:52|6988|43249:11851|new|utils.pm:run_ssh_command(5067)|SSH > command executed on cmp2, returning (0, "") > 2014-05-27 08:22:52|6988|43249:11851|new|Ubuntu.pm:reserve(206)|cleared > admin from /etc/sudoers > 2014-05-27 > 08:22:52|6988|43249:11851|new|utils.pm:run_ssh_command(4935)|executing > SSH command on cmp2: > |6988|43249:11851|new| /usr/bin/ssh -i /etc/vcl/vcl.key -o > StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o > ConnectionAttempts=1 -o ConnectTimeout=3 -l root -p 22 -x cmp2 'echo "admin > ALL= NOPASSWD: ALL" >> /etc/sudoers' 2>&1 > 2014-05-27 > 08:22:52|6988|43249:11851|new|utils.pm:run_ssh_command(5053)|run_ssh_command > output: > 2014-05-27 08:22:52|6988|43249:11851|new|utils.pm:run_ssh_command(5067)|SSH > command executed on cmp2, returning (0, "") > 2014-05-27 08:22:52|6988|43249:11851|new|Ubuntu.pm:reserve(213)|added > admin to /etc/sudoers > 2014-05-27 08:22:52|6988|43249:11851|new|new.pm:reserve_computer(968)|OS > module successfully reserved resources for this reservation > > > > From: Andy Kurth <[email protected]> > Reply-To: "[email protected]" <[email protected]> > Date: Friday, May 23, 2014 11:27 AM > To: "[email protected]" <[email protected]> > Subject: Re: Strange behavior with Ubuntu Images > > It sounds like the password isn't getting set. Please send the > vcld.log output for one of your problematic reservations. I'll take a look > at it. > > One thing to check would be to try to log in using the credentials > displayed on the page directly to the VM's console. This will determine if > SSH has anything to do with it. > > Regards, > Andy > > > On Fri, May 23, 2014 at 8:59 AM, Josh Thompson <[email protected]>wrote: > >> Al, >> >> I'd suggest logging in to the VM as root from the management node and >> checking >> log files for why it says the user is being denied access. In additional >> to >> checking log files, another thing you can do that can help with debugging >> is >> to stop the external sshd process and then run it in debugging mode. You >> can >> stop the existing process with >> >> initctl stop ext_ssh >> >> Then, run it again with >> >> /usr/sbin/sshd -d -f /etc/ssh/external_sshd_config >> >> This runs sshd in the foreground with debug output enabled. Also, you can >> specify multiple "d" options to increase the verbosity of the debug output >> (i.e. -dd or -ddd). >> >> After doing the above, you can then try to log in again from another >> console >> to get a better idea of why it is failing. >> >> Josh >> >> On Thu May 22 2014 8:10:58 PM Evelio Quiros wrote: >> > Specifically, what happens is that I create a reservation for the newly >> > created image (after I add it to the correct groups). The reservation >> > becomes ready, and I attempt to log into the IP address it gives me. I >> get >> > a password prompt from that IP. It all looks fine until I enter the >> > password given by the "Connect" screen. I always get a "permission >> denied" >> > error. Hmmmm.... >> > >> > Any Ideas ? >> > >> > Thanks, >> > Al Quiros >> > Enterprise Systems >> > University Technology Services >> > Florida International University >> > -------------------------------------------- >> > http://vcl.fiu.edu >> > http://ircc.fiu.edu >> > http://myweb.fiu.edu >> > >> > >> > From: Al Quiros <[email protected]<mailto:[email protected]>> >> > Reply-To: "[email protected]<mailto:[email protected]>" >> > <[email protected]<mailto:[email protected]>> Date: Thursday, May >> 22, >> > 2014 3:41 PM >> > To: "[email protected]<mailto:[email protected]>" >> > <[email protected]<mailto:[email protected]>> Subject: Strange >> behavior >> > with Ubuntu Images >> > >> > Hello VCL list, >> > >> > Up to now, I had been working with redhat, and centos linux images (they >> > work fine). I captured an Ubuntu image successfully. I used the Ubuntu >> > option in Setup. It appeared fine, except that I cannot log into any >> > reservations made with that image. Has anyone seen this behavior >> before? Am >> > I missing some critical step in creating the image to capture ? >> > >> > Thanks, >> > Al Quiros >> > Enterprise Systems >> > University Technology Services >> > Florida International University >> > -------------------------------------------- >> > http://vcl.fiu.edu >> > http://ircc.fiu.edu >> > http://myweb.fiu.edu >> -- >> ------------------------------- >> Josh Thompson >> Systems Programmer >> Virtual Computing Lab (VCL) >> North Carolina State University >> >> [email protected] >> 919-515-5323 >> >> my GPG/PGP key can be found at www.keyserver.net >> >> All electronic mail messages in connection with State business which >> are sent to or received by this account are subject to the NC Public >> Records Law and may be disclosed to third parties. > > >
