diff --git a/lam/lib/account.inc b/lam/lib/account.inc index 39d51c91..a9fa2977 100644 --- a/lam/lib/account.inc +++ b/lam/lib/account.inc @@ -815,7 +815,9 @@ function createhost() { // Will create the LDAP-Host if ($success) ldap_delete($_SESSION['ldap']->server(),$_SESSION['account_old']->general_dn); } if (!$success) return 5; - if ($attr['uidNumber']!=$_SESSION['account_old']->general_uidNumber) echo ('find / -uid ' . $_SESSION['account_old' ]->general_uidNumber . ' -exec chown ' . $_SESSION['account']->general_uidNumber . ' {} \;'); + if ($attr['uidNumber']!=$_SESSION['account_old']->general_uidNumber) StatusMessage('INFO', _('Attention:'), + _('You have to run the following command if yuo want to preserve filepermission: '). + ('find / -uid ' . $_SESSION['account_old' ]->general_uidNumber . ' -exec chown ' . $_SESSION['account']->general_uidNumber . ' {} \;')); // Write Groupmemberchips $allgroups = $_SESSION['account']->general_groupadd; if (!in_array($_SESSION['account']->general_group, $allgroups)) $allgroups[] = $_SESSION['account']->general_group; diff --git a/lam/templates/account.php b/lam/templates/account.php index 9115a167..0be30415 100644 --- a/lam/templates/account.php +++ b/lam/templates/account.php @@ -24,9 +24,10 @@ $Id$ */ include_once('../lib/account.inc'); // File with custom functions -include_once('../lib/config.inc'); -include_once('../lib/ldap.inc'); -include_once('../lib/profiles.inc'); +include_once('../lib/config.inc'); // File with configure-functions +include_once('../lib/ldap.inc'); // LDAP-functions +include_once('../lib/profiles.inc'); // functions to load and save profiles +include_once('../templates/status.php'); // Return error-message registervars(); // Register all needed variables in session and register session $error = "0"; @@ -218,11 +219,10 @@ echo '
- - - '; + '; + if ($error != "0") StatusMessage('ERROR', _('Invalid Value!'), $error); + echo '
'; - if ($error != "0") echo $error; - echo '
+ '; if (!$select_local) $select_local='general'; @@ -715,27 +715,24 @@ switch ($select_local) { switch ( $_SESSION['type2'] ) { case 'user' : if (($_SESSION['modify']==1) && ($_SESSION['account']->general_uidNumber != $_SESSION['account_old']->general_uidNumber)) { - echo ''; + echo ''; + StatusMessage ('INFO', _('UID-number has changed. You have to run the following command as root in order to change existing file-permissions:'), + 'find / -gid ' . $_SESSION['account_old' ]->general_uidNumber . ' -exec chown ' . $_SESSION['account']->general_uidNumber . ' {} \;'); + echo ''; } if (($_SESSION['modify']==1) && ($_SESSION['account']->general_homedir != $_SESSION['account_old']->general_homedir)) { - echo ''; + echo ''; + StatusMessage ('INFO', _('Home Directory has changed. You have to run the following command as root in order to change the existing homedirectory:'), + 'mv ' . $_SESSION['account_old' ]->general_homedir . ' ' . $_SESSION['account']->general_homedir); + echo ''; } break; case 'group' : if (($_SESSION['modify']==1) && ($_SESSION['account']->general_uidNumber != $_SESSION['account_old']->general_uidNumber)) { - echo ''; + echo ''; + StausMessage ('INFO', _('GID-number has changed. You have to run the following command as root in order to change existing file-permissions:'), + 'find / -gid ' . $_SESSION['account_old' ]->general_uidNumber . ' -exec chgrp ' . $_SESSION['account']->general_uidNumber . ' {} \;'); + echo ''; echo '
'; - echo _('UID-number has changed. You have to run the following command as root in order to change existing file-permissions:'); - echo ''; - echo 'find / -gid ' . $_SESSION['account_old' ]->general_uidNumber . ' -exec chown ' . $_SESSION['account']->general_uidNumber . ' {} \;'; - echo '
'; - echo _('Home Directory has changed. You have to run the following command as root in order to change the existing homedirectory:'); - echo ''; - echo 'mv ' . $_SESSION['account_old' ]->general_homedir . ' ' . $_SESSION['account']->general_homedir; - echo '
'; - echo _('GID-number has changed. You have to run the following command as root in order to change existing file-permissions:'); - echo ''; - echo 'find / -gid ' . $_SESSION['account_old' ]->general_uidNumber . ' -exec chgrp ' . $_SESSION['account']->general_uidNumber . ' {} \;'; - echo '
'; echo 'final_changegids) echo ' checked ';