-
How to automatically set password for user knoppix.
Hello, I have a bash script named newpw I got from another forum:
it executes as newpw knoppix 123456 where 123456 is the new password
#!/bin/bash
# \
exec expect -f "$0" ${1+"$@"}
set password [lindex $argv 1]
spawn passwd [lindex $argv 0]
expect "assword:"
send "$password\r"
expect "assword:"
send "$password\r"
expect eof
It seems to execute OK when I chmod to 777 newpw. However the new password is not taking. When I try to ftp into the machine the only password that works is one I set up by executing passwd knoppix at the command line directly. Any ideas on how to get this to work? Thanks
Similar Threads
-
By polhen in forum General Support
Replies: 1
Last Post: 01-10-2009, 02:30 PM
-
By pau in forum General Support
Replies: 2
Last Post: 05-09-2004, 01:28 PM
-
By cocojumbo in forum Hdd Install / Debian / Apt
Replies: 2
Last Post: 11-07-2003, 09:40 AM
-
By ian in forum Customising & Remastering
Replies: 2
Last Post: 08-21-2003, 08:54 AM
-
By ktheking in forum Customising & Remastering
Replies: 3
Last Post: 06-15-2003, 09:32 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

Dell 6P85J 4TB ST4000NM0063 7.2k 6Gb/s 3.5” SAS SED Hard Drive with Tray
$39.99

Western Digital HUS726T4TAL5204 4TB 7.2K SAS 12Gb/s 3.5" 512e HDD NetApp X375A
$64.00

20TB 7200 RPM SATA III Internal 3.5" White Label Hard drive
$349.99

HGST Ultrastar HUS726040AL5210 4TB 7200RPM SAS 12Gb/s Enterprise HDD
$41.00

Seagate Barracuda ST1000DM003 1 TB SATA III 3.5 in Desktop Hard Drive
$23.99

Dell ST6000NM0034 1HT27Z-150 NWCCG 6TB SAS 3.5 7.2K ENTERPRISE SERVER DRIVE
$68.99

Seagate Exos ST2000NX0253 HDD 2TB SATA 7.2K 2.5" 512b/s
$58.00

Lot of 2 HP 4TB / 128MB SATA 7.2K RPM 3.5" Hard Drive MB4000GCWDC /ST4000NM0033
$125.00

Toshiba DT01ACA100 1 TB 3.5" SATA III 3.5 in Desktop Hard Drive
$24.99

DELL 2TB Enterprise HDD (7200RPM, 3.5", SATA III, 128MB Cache) HUS722T2TALA600
$49.95