/etc/nologin vs /sbin/nologin

Hi,

I'm watching 

https://linuxacademy.com/cp/courses/lesson/course/1098/lesson/1/module/125

and terry talks about the nologin shell

1. pointing to /etc/nologin

2. not even existing there by design


i don't find that to be the case in centos6/7, fedora29, ubuntu12.04, or even slackware.


i doubt it's because i'm running them (except fedora as host) in vagrant boxes...


so what's up with that? 

was /etc/nologin a thing in the past?

  • post-author-pic
    Terrence C
    11-08-2018

    Hello!


    When the file does not exist (which it does not by default on recent distributions), you can still create it to temporarily disable user logins and optionally provide a message about it (i.e. an easy way to disable logins and indicate system maintenance).

Looking For Team Training?

Learn More