create core package

This commit is contained in:
aydemir
2015-02-24 11:18:35 +02:00
parent 0e4b743b82
commit 70b25d0f95
1098 changed files with 169545 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
# useradd defaults file
GROUP=100
HOME=/home
INACTIVE=-1
EXPIRE=
SHELL=/bin/bash
SKEL=/etc/skel
+170
View File
@@ -0,0 +1,170 @@
# *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
#
# *REQUIRED* The default PATH settings, for superuser and normal users.
#
# (they are minimal, add the rest in the shell startup files)
ENV_SUPATH PATH=/sbin:/bin:/usr/sbin:/usr/bin
ENV_PATH PATH=/bin:/usr/bin
# 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 1000
UID_MAX 60000
#
# Min/max values for automatic gid selection in groupadd
#
GID_MIN 1000
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
# The permission mask is initialized to this value. If not specified,
# the permission mask will be initialized to 022.
UMASK 077
# This enables userdel to remove user groups if no members exist.
#
USERGROUPS_ENAB yes
# Use MD5 or DES to encrypt password? Red Hat use MD5 by default, not anymore
MD5_CRYPT_ENAB yes
# Use SHA512 to encrypt password.
#ENCRYPT_METHOD SHA512
#
# Delay in seconds before being allowed another attempt after a login failure
#
#FAIL_DELAY 3
#
# Enable display of unknown usernames when login failures are recorded.
#
#LOG_UNKFAIL_ENAB no
#
# Enable logging of successful logins
#
#LOG_OK_LOGINS no
#
# Enable "syslog" logging of su activity - in addition to sulog file logging.
# SYSLOG_SG_ENAB does the same for newgrp and sg.
#
#SYSLOG_SU_ENAB yes
#SYSLOG_SG_ENAB yes
#
# If defined, either full pathname of a file containing device names or
# a ":" delimited list of device names. Root logins will be allowed only
# upon these devices.
#
#CONSOLE /etc/securetty
#CONSOLE console:tty01:tty02:tty03:tty04
#
# If compiled with cracklib support, where are the dictionaries
#
#CRACKLIB_DICTPATH /usr/share/cracklib
#
# If defined, the command name to display when running "su -". For
# example, if this is defined as "su" then a "ps" will display the
# command is "-su". If not defined, then "ps" would display the
# name of the shell actually being run, e.g. something like "-sh".
#
#SU_NAME su
#
# If defined, file which inhibits all the usual chatter during the login
# sequence. If a full pathname, then hushed mode will be enabled if the
# user's name or shell are found in the file. If not a full pathname, then
# hushed mode will be enabled if the file exists in the user's home directory.
#
#HUSHLOGIN_FILE .hushlogin
#HUSHLOGIN_FILE /etc/hushlogins
#
# Login configuration initializations:
#
# ERASECHAR Terminal ERASE character ('\010' = backspace).
# KILLCHAR Terminal KILL character ('\025' = CTRL/U).
# UMASK Default "umask" value.
#
# The ERASECHAR and KILLCHAR are used only on System V machines.
# The ULIMIT is used only if the system supports it.
# (now it works with setrlimit too; ulimit is in 512-byte units)
#
# Prefix these values with "0" to get octal, "0x" to get hexadecimal.
#
#ERASECHAR 0177
#KILLCHAR 025
#UMASK 022
#
# Max number of login retries if password is bad
#
#LOGIN_RETRIES 3
#
# Max time in seconds for login
#
#LOGIN_TIMEOUT 60
#
# When prompting for password without echo, getpass() can optionally
# display a random number (in the range 1 to GETPASS_ASTERISKS) of '*'
# characters for each character typed. This feature is designed to
# confuse people looking over your shoulder when you enter a password :-).
# Also, the new getpass() accepts both Backspace (8) and Delete (127)
# keys to delete previous character (to cope with different terminal
# types), Control-U to delete all characters, and beeps when there are
# no more characters to delete, or too many characters entered.
#
# Setting GETPASS_ASTERISKS to 1 results in more traditional behaviour -
# exactly one '*' displayed for each character typed.
#
# Setting GETPASS_ASTERISKS to 0 disables the '*' characters (Backspace,
# Delete, Control-U and beep continue to work as described above).
#
# Setting GETPASS_ASTERISKS to -1 reverts to the traditional getpass()
# without any new features. This is the default.
#
#GETPASS_ASTERISKS 0
+12
View File
@@ -0,0 +1,12 @@
#%PAM-1.0
auth required pam_securetty.so
auth include system-auth
auth required pam_nologin.so
account include system-auth
password include system-auth
session include system-auth
session optional pam_console.so
+9
View File
@@ -0,0 +1,9 @@
#%PAM-1.0
auth required pam_deny.so
account required pam_deny.so
password required pam_deny.so
session required pam_deny.so
+8
View File
@@ -0,0 +1,8 @@
#%PAM-1.0
auth sufficient pam_rootok.so
auth include system-auth
account include system-auth
password include system-auth
+8
View File
@@ -0,0 +1,8 @@
#%PAM-1.0
auth sufficient pam_rootok.so
auth required pam_permit.so
account include system-auth
password required pam_permit.so
+32
View File
@@ -0,0 +1,32 @@
#%PAM-1.0
auth sufficient pam_rootok.so
# If you want to restrict users begin allowed to su even more,
# create /etc/security/suauth.allow (or to that matter) that is only
# writable by root, and add users that are allowed to su to that
# file, one per line.
#auth required pam_listfile.so item=ruser sense=allow onerr=fail file=/etc/security/suauth.allow
# Uncomment this to allow users in the wheel group to su without
# entering a passwd.
#auth sufficient pam_wheel.so use_uid trust
# Alternatively to above, you can implement a list of users that do
# not need to supply a passwd with a list.
#auth sufficient pam_listfile.so item=ruser sense=allow onerr=fail file=/etc/security/suauth.nopass
# Comment this to allow any user, even those not in the 'wheel'
# group to su
auth required pam_wheel.so use_uid
auth include system-auth
account include system-auth
password include system-auth
session include system-auth
session required pam_env.so
session optional pam_xauth.so
@@ -0,0 +1,14 @@
#%PAM-1.0
auth required pam_env.so
auth sufficient pam_unix.so likeauth nullok nodelay
auth required pam_deny.so
account required pam_unix.so
password required pam_cracklib.so retry=3
password sufficient pam_unix.so nullok md5 shadow use_authtok
password required pam_deny.so
session required pam_limits.so
session required pam_unix.so
+29
View File
@@ -0,0 +1,29 @@
# /etc/securetty: list of terminals on which root is allowed to login.
# See securetty(5) and login(1).
vc/1
vc/2
vc/3
vc/4
vc/5
vc/6
vc/7
vc/8
vc/9
vc/10
vc/11
vc/12
tty1
tty2
tty3
tty4
tty5
tty6
tty7
tty8
tty9
tty10
tty11
tty12
tts/0
ttyS0
@@ -0,0 +1,25 @@
diff -u shadow-4.1.5/src/usermod.c.orig shadow-4.1.5/src/usermod.c
--- shadow-4.1.5/src/usermod.c.orig 2012-02-13 08:19:43.792146449 -0500
+++ shadow-4.1.5/src/usermod.c 2012-02-13 08:21:19.375114500 -0500
@@ -182,7 +182,7 @@
struct tm *tp;
if (date < 0) {
- strncpy (buf, "never", maxsize);
+ strncpy (buf, "never", maxsize - 1);
} else {
time_t t = (time_t) date;
tp = gmtime (&t);
diff -u shadow-4.1.5/src/login.c.orig shadow-4.1.5/src/login.c
--- shadow-4.1.5/src/login.c.orig 2012-02-13 08:19:50.951994454 -0500
+++ shadow-4.1.5/src/login.c 2012-02-13 08:21:04.490430937 -0500
@@ -752,7 +752,8 @@
_("%s login: "), hostn);
} else {
strncpy (loginprompt, _("login: "),
- sizeof (loginprompt));
+ sizeof (loginprompt) - 1);
+ loginprompt[sizeof (loginprompt) - 1] = '\0';
}
retcode = pam_set_item (pamh, PAM_USER_PROMPT, loginprompt);
+9
View File
@@ -0,0 +1,9 @@
--- shadow-4.1.2.1/libmisc/xmalloc.c 2008-08-30 21:55:44.000000000 -0500
+++ shadow-4.1.2.1/libmisc/xmalloc.c.new 2008-08-30 21:55:36.000000000 -0500
@@ -61,5 +61,6 @@
char *xstrdup (const char *str)
{
+ if(str == NULL) return NULL;
return strcpy (xmalloc (strlen (str) + 1), str);
}