View Full Version : can't find login.defs in /etc/
ISOS6
10-20-2009, 03:52 AM
Hello,
After much searching for problem with adding new user I found that login.defs not found in the / etc /
How do I get this file again?
Thank you in advance!
nobaloney
10-22-2009, 11:19 AM
Below is a copy of the file on one of my CentOS 4.8 boxes:
# *REQUIRED*
# Directory where mailboxes reside, _or_ name of file, relative to the
# home directory. If you _do_ define both, MAIL_DIR takes precedence.
# QMAIL_DIR is for Qmail
#
#QMAIL_DIR Maildir
MAIL_DIR /var/spool/mail
#MAIL_FILE .mail
# Password aging controls:
#
# PASS_MAX_DAYS Maximum number of days a password may be used.
# PASS_MIN_DAYS Minimum number of days allowed between password changes
# PASS_MIN_LEN Minimum acceptable password length.
# PASS_WARN_AGE Number of days warning given before a password expires.
#
PASS_MAX_DAYS 99999
PASS_MIN_DAYS 0
PASS_MIN_LEN 5
PASS_WARN_AGE 7
#
# Min/max values for automatic uid selection in useradd
File login.defs not changed so no update needed.
[jlasman@da12 etc]$ cat redhat-release
CentOS release 4.8 (Final)
[jlasman@da12 etc]$ cat login.defs
# *REQUIRED*
# Directory where mailboxes reside, _or_ name of file, relative to the
# home directory. If you _do_ define both, MAIL_DIR takes precedence.
# QMAIL_DIR is for Qmail
#
#QMAIL_DIR Maildir
MAIL_DIR /var/spool/mail
#MAIL_FILE .mail
# Password aging controls:
#
# PASS_MAX_DAYS Maximum number of days a password may be used.
# PASS_MIN_DAYS Minimum number of days allowed between password changes.
# PASS_MIN_LEN Minimum acceptable password length.
# PASS_WARN_AGE Number of days warning given before a password expires.
#
PASS_MAX_DAYS 99999
PASS_MIN_DAYS 0
PASS_MIN_LEN 5
PASS_WARN_AGE 7
#
# Min/max values for automatic uid selection in useradd
#
UID_MIN 500
UID_MAX 60000
#
# Min/max values for automatic gid selection in groupadd
#
GID_MIN 500
GID_MAX 60000
#
# If defined, this command is run when removing a user.
# It should remove any at/cron/print jobs etc. owned by
# the user to be removed (passed as the first argument).
#
#USERDEL_CMD /usr/sbin/userdel_local
#
# If useradd should create home directories for users by default
# On RH systems, we do. This option is overridden with the -M flag on
# useradd command line.
#
CREATE_HOME yes
However I can't promise this is correct. Note that my server does run Maildir though the information in this file appears wrong. I don't know if this file will work for you.
Jeff
ISOS6
10-22-2009, 04:58 PM
Geting this error even, I do not know what happened to my DA. Have tried various solutions and troubleshooting, but does not help.:(
Error creating User: useradd.orig: unknown group $3
Cannot find a home directory after the system user creation for testname
The home directory for testname was not created.
The only one I know that everything that begins with the log have been deleted on my server, and that's why a lot of errors. Have fixed everything, now is the server up and running.
But the second solution, how can I clean-install DA without mise users?:confused:
nobaloney
10-24-2009, 01:41 PM
I don't know any way of reinstalling DirectAdmin while saving the users. I think you need to do an admin reseller level backup of the server, then rebuild it, then restore the backup.
Jeff
ISOS6
10-25-2009, 04:35 AM
Ok, anyway. Many thanks for your help. I will reinstall and then transfer the users manualy, which only helps when it has been so messy in the DA
=)
Powered by vBulletin™ Version 4.0.4 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.