can't find login.defs in /etc/

ISOS6

Verified User
Joined
May 7, 2009
Messages
318
Location
Erbil, Tarin Hills, Iraq
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!
 
Below is a copy of the file on one of my CentOS 4.8 boxes:
Code:
# *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
 
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:
 
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
 
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

=)
 
Back
Top