Announcement

Collapse
No announcement yet.

pipe password to command problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    pipe password to command problem

    hello yet again! I'm trying to run this script.
    #!/bin/bash
    passwd=$(kdialog --password "Enter password")
    echo "$password" | sudo -S bash -c dd if=/home/yikes/Downloads/kali/kali.iso of=/dev/sdb bs=4M status=progress​
    but i keep getting this error.
    [sudo] password for yikes: Sorry, try again.
    [sudo] password for yikes:
    sudo: no password was provided
    sudo: 1 incorrect password attempt

    I did quite a bit of research before i posted this but i had no joy.

    #2
    oki figured it out it was a typo on my behalf but now that i have that sorted i have a new error message. When i run shor.sh i now get this error
    [sudo] password for yikes: 0+0 records in
    0+0 records out
    0 bytes copied, 5.066e-05 s, 0.0 kB/s

    Comment


      #3
      ok i just figrerd it out AGAIN. If i omit the "bash -c" it runs fine

      Comment


        #4
        echo $password is problematic... for an alternative see my recent post
        Regards, John Little

        Comment

        Working...
        X