repo.or.cz
/
handlervirt.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
SIGTERM again
[handlervirt.git]
/
passwdchanger.sh
blob
d4e45fe8b49eb7ce5ae6535fbc5b5b1bcdc08d8e
1
#!/bin/bash
2
3
# Stefan de Konink <dekonink@kinkrsoftware.nl>
4
# Licensed under the GPL v3 or in your opinion any later version
5
#
6
# Usage passwdchanger <imagefile> <passwd>
7
8
DIR
=/
tmp
/
`basename
$1
`
9
mkdir
$DIR
&&
10
mount
-o
loop
$1 $DIR
&&
11
chroot
$DIR
/
usr
/
sbin
/
chpasswd
<<-EOT
12
root:
$2
13
EOT
14
umount
$DIR
&&
15
rmdir
$DIR