Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Add support for /etc/nologin #290

Open
AlbertVeli opened this issue Apr 4, 2024 · 0 comments
Open

Feature request: Add support for /etc/nologin #290

AlbertVeli opened this issue Apr 4, 2024 · 0 comments

Comments

@AlbertVeli
Copy link

Description

On Linux systems, it is common to create a file named /etc/nologin to deny login access (except for root). This feature can be useful for various scenarios, such as performing maintenance tasks or temporarily taking the system offline.

Proposed Implementation

To support this feature, consider making the following changes in the codebase:

  1. src/svr-main.c (main_inetd()):

    • Check for the existence of /etc/nologin.
    • If the file exists, prevent new login sessions except for the root user.
    • Display an appropriate message to users attempting to log in during this restricted period. For instance "User login not allowed at this time.".
  2. src/svr-main.c (main_noinetd()):

    • Similar to the above.

Benefits

  • Enhanced security: Prevent unauthorized logins during critical system operations.
  • Improved system management: Facilitate maintenance tasks without disrupting active user sessions.

Thank you for considering this enhancement!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants