Server Management - Systems Insight Manager
1824846 Members
3665 Online
109674 Solutions
New Discussion юеВ

Re: mkpasswd command in SSH

 
Troy Johnson_5
Occasional Contributor

mkpasswd command in SSH

Hello all, I have a couple systems that will not allow me to connect from the mxagent command on the CMS. I went to each of the managed system, to c:\program files\openssh\etc and the passwd folder is empty. I try to run the mkpasswd utility on the managed machine from the command prompt, and it appears to run but does not populate the passwd folder. One system is W2K server and one is W2K3 Server. Any ideas?
13 REPLIES 13
Rob Buxton
Honored Contributor

Re: mkpasswd command in SSH

I can only suggest reinstalling OpenSSH and see if that creates a correctly populated passwd file.
Troy Johnson_5
Occasional Contributor

Re: mkpasswd command in SSH

Hi Rob,

I have already tried uninstalling OpenSSH and re-installing. It isn't creating the file on install. The systems are part of our domain, so that should not be the issue either. Other systems have installed just fine.
Rob Buxton
Honored Contributor

Re: mkpasswd command in SSH

There is a glitch in some of the docs, you can end up with a file called Program (I think) in your C: Directory that contains the passwd details. There's a problem with the mkpasswd directions.
David Claypool
Honored Contributor

Re: mkpasswd command in SSH

Rob:

I went looking for the doc entry that results in the "C:\Program" directory getting created and didn't find it (I want to get the doc corrected). Can you direct me there and we'll fix it for the next release?
Rob Buxton
Honored Contributor

Re: mkpasswd command in SSH

David,

Good point.
A while back now, but I recall myself and someone else making the same error. It could have been we'd made the same misinterpretation so I may have to retract a bit.
I've just gone back through the Readme file as that's where I thought I'd got the original commands and they seem okay, except that you can't just execute the commands as is.
But I do recall that there was at least one other person that created a program file in the C: directory. It could only be due to a lack of quotes.
Rob Buxton
Honored Contributor

Re: mkpasswd command in SSH

David,
See
http://docs.hp.com/hpux/onlinedocs/5990-7221/5990-7221.html

There are no quotes around the location statement. Also, the login name and domain is somewhat merged leading to confusion.

Rob.
Troy Johnson_5
Occasional Contributor

Re: mkpasswd command in SSH

Thanks for looking at this gentlemen...

I do indeed have a program folder located in the root of the C: drive that contained the password information that was supposed to populate the passwd file in the \etc folder. I copied the data in, to no avail..I also see there are several other files that appear to be created during the installation, I tried copying these into the \etc folder as well but no luck.
Rob Buxton
Honored Contributor

Re: mkpasswd command in SSH

Troy,
Try the same request but make sure there are quotes around the output destination.

Rob.
Chad Klostermann
Occasional Advisor

Re: mkpasswd command in SSH

I experienced the same issue with HPSIM on an NT 4 domain trying to add W2K clients to my CMS (W2K). I resolved the issue by encapsulating the following:

mkpasswd -d -u login domain >> "C:\Program Files\OpenSSH\etc\passwd"

I also had to create a share on my PDC for the PUB key. Didn't see this in any docs.

Regards,

ck
Rob Buxton
Honored Contributor

Re: mkpasswd command in SSH

Chad,

A share for what? how was it referenced etc.
Could you provide a bit of detail.

As I'm still having fun with SSH this may be something that would help.

Cheers,

Rob.
Troy Johnson_5
Occasional Contributor

Re: mkpasswd command in SSH

Just a note to all who have responded that I am trying your recommendations, unfortunately to no avail. The quotes did correct my issue with not creating the passwd file correctly, however when I run mxagentconfig, I still cannot connect to the boxes. I do not have any NT systems in my current environment, nor do I have any units that were upgraded from an NT install. I am working with a fresh active directory environment. Thanks to all who have helped...
Rob Buxton
Honored Contributor

Re: mkpasswd command in SSH

For now, just try and conect to the CMS Server when running mxagentconfig

You should be able to connect with at least the local Administrator account and the Account used for installing OpenSSH/SIM

This certainly points to SSH as being the reason why your tasks are not running.
I've also found that mxagentconfig goes into a 100% CPU usage mode even when just firing up the application. Not sure what causes this but it causes grief.
Chad Klostermann
Occasional Advisor

Re: mkpasswd command in SSH

Rob/Troy,

I documented the steps I used.

1. Install all the latest windows updates and install MDAC update
-needed these for openssh to run

2. Followed HPSIM Howto on setting up a Windows managed system
http://docs.hp.com/hpux/onlinedocs/5990-6691/5990-6691.html

If Openssh install fails to initialize the sshd service you may need edit the hive for the service.

you may get a Error: 193 in the event log or command prompt

Hkey_Local_Machine
Sytem
Currentcontrolset
Services
Opensshd

encapsulate the "image path" key

3. encapsulate this command:
mkpasswd -d -u login domain >> "C:\Program Files\OpenSSH\etc\passwd"

4. If the "c:\program files\openssh\etc type passwd" command from the HPSIM documentation points to the \\Primary_domain_controller\administrator\.ssh...
-add an admin only share to the PDC called \administrator\ with a .ssh folder

--this will house the .CMS.pub key and authorized user file

5. Run mxagentconfig -g from the CMS. If it stills fails to connect do this:
--go to the ..\etc\passwd file of the managed sytem and remove the local admin entry.
--check eventviewer on the managed system. this will show you the status of mxagentconfig

Re-run mxagentconfig -g

6. Alas...connection.

Hope this helps.

ck