this post was submitted on 11 Sep 2023
41 points (81.5% liked)

Linux

48214 readers
703 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Source code: https://gist.github.com/sebastiancarlos/1a5b04099b750f5a15c77c8cb4f03fc8

### Sample output:
#
# CREATE_HOME        no
# CREATE_MAIL_SPOOL  no
# LOG_INIT           yes
# USERGROUPS_ENAB    yes
# HOME               /home
# MAIL_DIR           /var/spool/mail
# MAIL_FILE          N/A
# SHELL              /bin/bash
# SKEL               /etc/skel
# EXPIRE             N/A
# GROUP              984 (users)
# INACTIVE           -1
# PASS_MAX_DAYS      99999
# PASS_MIN_DAYS      0
# PASS_WARN_AGE      7
# UMASK              077
# -------------------------------------------------------------------------------------
# CREATE_HOME:       Create a home directory if it does not exist.
# CREATE_MAIL_SPOOL: Create a mailbox file for the user.
# LOG_INIT:          Add the user to the lastlog and faillog databases.
# USERGROUPS_ENAB:   If set to yes, useradd will create a group with the name of the
#                    user, and userdel will remove the user's group if it contains no
#                    more members.
# HOME:              The user's name will be affixed to form the new home.
# MAIL_DIR:          The mail spool file will be created using this value.
# MAIL_FILE:         Same, but relative to the user's home directory.
# SHELL:             The user's login shell.
# SKEL:              The skeleton directory, which contains files and directories to
#                    be copied into the user's home directory.
# EXPIRE:            The date on which the user account will be disabled, if any.
# GROUP:             If USERGROUPS_ENAB is set to no, or if the flag -N/--no-user-group
#                    is passed, this will be the new user's group.
# INACTIVE:          The number of days after a password has expired in which the
#                    password is still be accepted. -1 disables the inactive period.
# PASS_MAX_DAYS:     The number of days a password may be used. If is older, a password
#                    change will be forced.
# PASS_MIN_DAYS:     The minimum number of days allowed between password changes. Any
#                    attempt sooner will be rejected.
# PASS_WARN_AGE:     Warn user N days befere password expiration.
# UMASK:             The file mode creation mask is initialized to this value.
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 2 points 1 year ago

Yeah, ngl it was kinda hard to follow