0

My requirement is to change password of AIX server through java program. I used jsch library.

With jsch I can execute commands like ls -ltr, etc. But for passwd command, nothing is happening.

Kindly post your answer.

tomloprod
  • 7,472
  • 6
  • 48
  • 66
ALV
  • 569
  • 1
  • 5
  • 12
  • Take a look to this: [Take commands(password) from string and set as InputStream to Unix servers in Java (JSCH)](http://stackoverflow.com/a/18456644/4359029) – tomloprod Feb 06 '17 at 09:19
  • "Nothing is happening" - That's pretty vague. For sure the command at least outputs some error message or exit code. – Martin Prikryl Feb 06 '17 at 09:25
  • Also, where's your code? – Martin Prikryl Feb 06 '17 at 09:26
  • @MartinPrikryl : Nothing means No password changed but exit with sucess code - 0. – ALV Feb 06 '17 at 10:20
  • @tomloprod when i used jsch as said then it is asking for password : Changing password for "User" User's Old password: XXXXXX . But I already entered password so why it is asking again. – ALV Feb 06 '17 at 10:26

0 Answers0