summaryrefslogtreecommitdiffstats
path: root/application/controllers
diff options
context:
space:
mode:
authorSimon2011-04-20 20:23:17 +0200
committerSimon2011-04-20 20:23:17 +0200
commit46bf3a92626e46d0cc254b0c5442ab44484a81c8 (patch)
treef4b776758ebd61f2cb39b47a07f79e02f2e42c6f /application/controllers
parentRechte bei Filtern angepasst (diff)
downloadpbs2-46bf3a92626e46d0cc254b0c5442ab44484a81c8.tar.gz
pbs2-46bf3a92626e46d0cc254b0c5442ab44484a81c8.tar.xz
pbs2-46bf3a92626e46d0cc254b0c5442ab44484a81c8.zip
Userpasswort verschlüsselung
Diffstat (limited to 'application/controllers')
-rw-r--r--application/controllers/ResourceController.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/application/controllers/ResourceController.php b/application/controllers/ResourceController.php
index b538b07..7935b68 100644
--- a/application/controllers/ResourceController.php
+++ b/application/controllers/ResourceController.php
@@ -407,6 +407,7 @@ class ResourceController extends Zend_Controller_Action
exec("tar -C $path_userconf -xvf ../resources/config/$configID/default.tgz");
exec("echo '$loginname:x:1000:1000:".$person->getName()." ".$person->getFirstname().",,,:/home/$loginname:/bin/bash' >> $path_userconf/rootfs/etc/passwd");
exec("md5pass ".$person->getPassword(), $pwhash);
+ // crypt(password, '$6$'.randomString(8).'$')
exec("echo '$loginname:$pwhash[0]:0:0:99999:7:::' >> $path_userconf/rootfs/etc/shadow");
exec("echo 'mkdir /home/$loginname' >> $path_userconf/initramfs/postinit.local");
}