Changing HP password from Informix 4GL
Posted in 1999
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Security, Permissions & Auditing
Hi, More a HP problem than anything this but I thought I'd try I need to write a 4GL program for users to enter a 'new' user password, which then will update another system with that password and then the unix password file (don't ask why - its a long story and involves a third party package). The first bit is easy, but does anyone know how to automate a unix password change without user intervention?? 'passwd' doesn't allow for parameters to be passed through and doesn't like you attempting to put things through standard input. Please help Jeff McFee -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Well, since you said please..... ;-) There are several ways to do this. First, are you running your HP in an NIS environment? Are you using a regular HP OS or did you convert your system to a trusted system. (Use of a shadow passwd file?) You can do this via brute force which will require you to use a random number generator and generate a random 2byte (2 char) key, and use the crypt() command. This will allow you to build the encrypted string. Oh and if you are running it under NIS, it would be a different C program along with an expect shell script. You also have to think about the security implications and you need to verify that the account that they are chaning the passwd on is one that they already have access. Since you said you also wanted to change it on a remote system too, it gets a tad bit more complicated but its still not rocket science. One word of concern though. Its really reduces the security of the system and I don't recommend it. The bottom line: Yes it can be done. Yes I've done something similar. No, I won't post the code, and no I don't recommend it. Hope that helps. -Uncle Mikey jeffm@lysander.co.uk wrote: > Hi, > > More a HP problem than anything this but I thought I'd try > > I need to write a 4GL program for users to enter a 'new' user password, which > then will update another system with that password and then the unix password > file (don't ask why - its a long story and involves a third party package). > > The first bit is easy, but does anyone know how to automate a unix password > change without user intervention?? 'passwd' doesn't allow for parameters to be > passed through and doesn't like you attempting to put things through standard > input. > > Please help > > Jeff McFee