/** * Sets next free uid, the gid (configured in config.xml), the home directory (built of standard prefix and the given * user's username) and the configured login-shell. * * @param ldapUserValues * @param user */ public void setDefaultValues(final LdapUserValues ldapUserValues, final PFUserDO user) { final LdapConfig ldapConfig = ldapService.getLdapConfig(); LdapPosixAccountsConfig ldapPosixAccountsConfig = ldapConfig != null ? ldapConfig.getPosixAccountsConfig() : null; if (ldapPosixAccountsConfig == null) { ldapPosixAccountsConfig = new LdapPosixAccountsConfig(); } ldapUserValues.setUidNumber(getNextFreeUidNumber()); ldapUserValues.setGidNumber(ldapPosixAccountsConfig.getDefaultGidNumber()); ldapUserValues.setHomeDirectory(ldapPosixAccountsConfig.getHomeDirectoryPrefix() + user.getUsername()); ldapUserValues.setLoginShell(ldapPosixAccountsConfig.getDefaultLoginShell()); }
ldapUser.setLoginShell(values.getLoginShell()); } else { ldapUser.setLoginShell(posixAccountsConfig.getDefaultLoginShell());