🐧
Linux
  • syllabus
  • unit 1-Introduction
    • Unit I: Introduction to Linux
    • 2. Advantages of Linux over other operating systems
    • 3.File systems
    • 4.Culture of free software
  • unit 2-Basics of Linux
    • 1.Commands
    • 2.shell
    • 3.Text Editors
    • 4.The file system of Linux
    • 5.Directories and their special purpose
    • 6.permission
  • unit 3-Installation
    • 1. Partitioning
    • 2. Installation of Linux
    • 3. Troubleshooting of installation
  • unit 4-System Administration
    • 1.Root login
    • 2.Superuser
    • 3.Configuration of hardware with kudzu
    • 4. Checking System Space:
    • 5. Monitoring System Performance:
    • 6. Working with a File System:
    • 7.Configuring modules
    • 8.jail shell
    • 9.awk
    • 10.sed
  • unit 5-User Management
    • 1.Creating user accounts
    • 2.Setting user defaults
    • 3.Providing support to users
    • 4.Modifying accounts
    • 5.Deleting user accounts
    • 6.Checking disk quotas
    • 7.Sending mail to all users
  • unit 6-Security and System Handling
    • 1.Understanding shell scripts
    • 2.System startup and shutdown
    • 3.Scheduling system tasks
    • 4.Backing up and restoring
    • 5.Password protection
    • 6.File security
  • unit 7-Setting up a Web Server
    • 1.Introduction to a web server
    • 2.Starting the Apache webserver
    • 3.Configuring the Apache webserver
    • 4.Monitoring server activities
  • unit 8-Setting up DHCP and NIS
    • 1.Introduction to DHCP
    • 2.Setting up DHCP Server
    • 3.Setting up DHCP Client
    • 4.Understand NIS
  • unit 9-Setting up a Database Server
    • 1.Configuring database server
    • 2.Checking the status
    • 3.Working with database
  • unit 10-Setting up DNS
    • 1.Introduction to DNS
    • 2.Setting up DNS and configuration
    • 3.Querying DNS
  • unit 11-ISP Simulation
    • 1.Integration of servers
    • 2.DNS, Web, Email, etc
  • fullform
  • Assignment
  • Practicals
    • 1.Linux utilities
    • 2.OS installation project work
    • 3.User management using a terminal
    • 4.Security level access control list
    • 1.Network setting
    • 2.Server configuration of DHCP, DNS, Database server
    • 3.Demonstration of the web, mail, file server
  • imp questions
    • short-notes
    • unit 1
    • unit 2
    • unit 3
    • unit 4
    • unit 5
    • unit 6
    • unit 7
    • unit 8
    • unit 9
    • unit 10
    • unit 11
    • unit ii
  • services
    • create_service
  • Viva+Practical
    • VIVA questions
    • Practical questions
Powered by GitBook
On this page

Was this helpful?

  1. unit 5-User Management

2.Setting user defaults

Setting user defaults in a Linux system involves configuring default settings and behaviors for user accounts. These defaults are applied when new user accounts are created or when existing users log in for the first time. To set user defaults, you can use various configuration files and commands.

  1. Useradd Defaults:

    • The useradd command allows you to specify default settings for newly created user accounts. You can configure these defaults in the /etc/default/useradd file.

    • Open the /etc/default/useradd file for editing:

      sudo nano /etc/default/useradd
    • Here are some common defaults that you can configure in this file:

      • HOME: Default home directory for new users.

      • CREATE_MAIL_SPOOL: Whether to create a mailbox for new users.

      • SHELL: Default shell for new users.

    • Save any changes you make and exit the text editor.

  2. Skeleton Directory:

    • The /etc/skel directory contains files and directories that are copied to a new user's home directory when the user is created. You can customize the contents of this directory to set default files or configurations for new users.

    • For example, if you want to provide a default .bashrc file for new users, place it in the /etc/skel directory:

      sudo cp /path/to/default/.bashrc /etc/skel/
    • Ensure that the files you place in /etc/skel have appropriate permissions and ownership.

  3. Login Defaults - /etc/login.defs:

    • The /etc/login.defs file contains system-wide defaults for user login settings. It includes parameters like password expiration policies, password complexity requirements, and more.

    • You can edit this file to configure login-related defaults, but exercise caution as some changes can affect the system's security policies.

    • Open the /etc/login.defs file for editing:

      sudo nano /etc/login.defs
    • Make changes as needed and save the file.

  4. Default Groups:

    • You can assign new users to default groups by configuring the /etc/default/useradd file, as mentioned earlier. However, you can also set default groups for users in the /etc/group file.

    • For example, if you want all new users to be members of a group named users, you can add them to the users group in the /etc/group file.

  5. Default Shell:

    • You can set the default shell for all users in the /etc/default/useradd file, as mentioned earlier. Alternatively, you can modify the /etc/passwd file to change the default shell for specific users.

    • Use the chsh command to change the shell for a user:

      sudo chsh -s /bin/bash username

      Replace /bin/bash with the desired shell and username with the username of the user you want to modify.

  6. Default umask:

    • The default umask value determines the permissions assigned to new files and directories created by users. You can set the default umask in the shell startup files, such as /etc/profile or /etc/bashrc.

    • For example, to set a default umask of 002 (which grants read, write, and execute permissions to the owner and group and read and execute permissions to others), you can add the following line to /etc/profile:

      umask 002
    • Make sure to add this line to the appropriate shell startup file depending on the default shell used in your system.

Previous1.Creating user accountsNext3.Providing support to users

Last updated 1 year ago

Was this helpful?