Files behind user profile & skel dir

Files behind user profile & skel dir

[root@omd ~]# cat /etc/login.defs 
#
# Please note that the parameters in this configuration file control the
# behavior of the tools from the shadow-utils component. None of these
# tools uses the PAM mechanism, and the utilities that use PAM (such as the
# passwd command) should therefore be configured elsewhere. Refer to
# /etc/pam.d/system-auth for more information.
#

# *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                  1000
UID_MAX                 60000
# System accounts
SYS_UID_MIN               201
SYS_UID_MAX               999

#
# Min/max values for automatic gid selection in groupadd
#
GID_MIN                  1000
GID_MAX                 60000
# System accounts
SYS_GID_MIN               201
SYS_GID_MAX               999

#
# 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 SHA512 to encrypt password.
ENCRYPT_METHOD SHA512

[root@omd ~]# cat /etc/default/useradd 
# useradd defaults file
GROUP=100
HOME=/home
INACTIVE=-1
EXPIRE=
SHELL=/bin/bash
SKEL=/etc/skel
CREATE_MAIL_SPOOL=yes

[root@omd default]#cat /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=”$(sed ‘s, release .*$,,g’ /etc/system-release)”
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT=”console”
GRUB_CMDLINE_LINUX=”crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet”
GRUB_DISABLE_RECOVERY=”true”
[root@omd default]#cat /etc/default/nss
# /etc/default/nss
# This file can theoretically contain a bunch of customization variables
# for Name Service Switch in the GNU C library. For now there are only
# four variables:
#
# NETID_AUTHORITATIVE
# If set to TRUE, the initgroups() function will accept the information
# from the netid.byname NIS map as authoritative. This can speed up the
# function significantly if the group.byname map is large. The content
# of the netid.byname map is used AS IS. The system administrator has
# to make sure it is correctly generated.
#NETID_AUTHORITATIVE=TRUE
#
# SERVICES_AUTHORITATIVE
# If set to TRUE, the getservbyname{,_r}() function will assume
# services.byservicename NIS map exists and is authoritative, particularly
# that it contains both keys with /proto and without /proto for both
# primary service names and service aliases. The system administrator
# has to make sure it is correctly generated.
#SERVICES_AUTHORITATIVE=TRUE
#
# SETENT_BATCH_READ
# If set to TRUE, various setXXent() functions will read the entire
# database at once and then hand out the requests one by one from
# memory with every getXXent() call. Otherwise each getXXent() call
# might result into a network communication with the server to get
# the next entry.
SETENT_BATCH_READ=TRUE
#
# ADJUNCT_AS_SHADOW
# If set to TRUE, the passwd routines in the NIS NSS module will not
# use the passwd.adjunct.byname tables to fill in the password data
# in the passwd structure. This is a security problem if the NIS
# server cannot be trusted to send the passwd.adjuct table only to
# privileged clients. Instead the passwd.adjunct.byname table is
# used to synthesize the shadow.byname table if it does not exist.
#ADJUNCT_AS_SHADOW=TRUE
[root@omd ~]# cd /etc/skel/

[root@omd skel]# ls -a
.  ..  .bash_logout  .bash_profile  .bashrc  .mozilla

[root@omd skel]# touch file1

[root@omd skel]# useradd kack

[root@omd skel]# su – kack

[kack@omd ~]$ ls -l
total 0
-rw-r–r– 1 kack kack 0 Aug 30 11:58 file1

[kack@omd ~]$ logout

[root@omd skel]# ls -al
total 24
drwxr-xr-x.   3 root root   86 Aug 30 11:58 .
drwxr-xr-x. 153 root root 8192 Aug 30 11:59 ..
-rw-r–r–    1 root root   18 Aug  2 21:30 .bash_logout
-rw-r–r–    1 root root  193 Aug  2 21:30 .bash_profile
-rw-r–r–    1 root root  231 Aug  2 21:30 .bashrc
-rw-r–r–    1 root root    0 Aug 30 11:58 file1
drwxr-xr-x    4 root root   37 Aug 29 14:13 .mozilla

[root@omd skel]# su – kack
Last login: Tue Aug 30 11:59:24 IST 2016 on pts/0

[kack@omd ~]$ ls -la
total 16
drwx——  5 kack kack 133 Aug 30 12:00 .
drwxr-xr-x. 3 root root  17 Aug 30 11:59 ..
-rw——-  1 kack kack   6 Aug 30 12:00 .bash_history
-rw-r–r–  1 kack kack  18 Aug  2 21:30 .bash_logout
-rw-r–r–  1 kack kack 193 Aug  2 21:30 .bash_profile
-rw-r–r–  1 kack kack 231 Aug  2 21:30 .bashrc
drwxrwxr-x  3 kack kack  17 Aug 30 11:59 .cache
drwxrwxr-x  3 kack kack  17 Aug 30 11:59 .config
-rw-r–r–  1 kack kack   0 Aug 30 11:58 file1
drwxr-xr-x  4 kack kack  37 Aug 29 14:13 .mozilla

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s