0

This is my situation. I am trying to run the following command in WINDOWS 7

    plink.exe user@ip.add.re.ss -pw password "passwd user"

to change the password for a particular user.

it keeps giving me permission denied. The other commands like useradd and passwd -f $USER works fine.

To me it seems that after ssh, plink tries to run the command in some other shell or something.

Machine is running solaris 8.

Please help

Thanks and regards.

1 Answers1

1

You could try adding -t to your plink command line as passwd is interactive and needs a tty.

Most passwd implementations* only allow root to specify a username perhaps you need to use either

plink.exe -t root@ip.add.re.ss -pw password "passwd user"

or if your command is a true reflection of what you're attempting then and the user in both cases is the same, then you don't need to specify the username

plink.exe -t user@ip.add.re.ss -pw password "passwd"

*I haven't use Solaris 8 since Solaris 9 became a thing in 2003 so I may be wildly wrong assuming S8 passwd acts like others.

kasperd
  • 29,894
  • 16
  • 72
  • 122
user9517
  • 114,104
  • 20
  • 206
  • 289
  • BRO you are a saviour, but can you explain more what does the -t does and why it wasn't working before? Thanks, works like a charm. – Misbah Bin Mashkoor Aug 24 '15 at 07:28
  • I am not your `bro` please stop disrespecting me. I am not your research assistant either. If you want to know more about `tty` then do some personal research, I would suggest entering tty into google and following on from there. – user9517 Aug 24 '15 at 08:36
  • wow what arrogance, why does bro disrespect you? I thought people were helping here, not showing out their arrogance. I just asked a simple question, does it hurt in expanding your answer? I guess you are one of those people who put their knowledge in a box , shut it and cut a small slit to just insult people that they don't know this or that. – Misbah Bin Mashkoor Aug 24 '15 at 09:30
  • @MisbahBinMashkoor I put my knowledge so far into a box that I have apparently reached out to 4.4 million people on this site alone. I provided you useful answers - how is that putting stuff in a box? Being called 'bro' offends me. That you didn't even take a couple of minutes to do some personal research really offends me. It is help vampires like you that have made this site a poor reflection of what it could have been. – user9517 Aug 24 '15 at 11:29
  • I did research as far as my knowledge allowed me to . Rather than putting insulting comments, providing a one line explanation to guide someone would have been good use of both of our time, been researching for much more than couple of minutes but when you are asked about something you know, what you do? u hit back with insulting comments? Stuff in a box, providing glimpse and then shutting yourself off. You provided me with an amazing answer. I hope 4.4mil people haven't received the same treatment. Its cause of people like you folks stop asking questions. Good Bye bro and be well – Misbah Bin Mashkoor Aug 24 '15 at 17:56