Configuration guides for IT Administrators

Difference between /sbin/nologin and /bin/false

Difference between /sbin/nologin and /bin/false

Both these commands /sbin/nologin and /bin/false are used to refuse login attempt however they differ slightly on providing customizable error message to user.

/sbin/nologin

  • To restrict a user from SSH to server
  • When someone attempts to SSH with this user defined with /sbin/nologin, a cusotmizable message can be shown to the user. By default gets ‘This account is currently not available’
  • A customizable message can be set in /etc/nologin.txt

$ sudo useradd -s /sbin/nologin itadminguideuser

/bin/false

  • Also restricts a user from SSH to server
  • When someone attempts to SSH with this user defined with /bin/false, a user is immediately logged out with a proper message

$ sudo useradd -s /bin/false itadminguideuser

Categories:

4 responses to “Difference between /sbin/nologin and /bin/false”

  1. Appliance Repair Guides avatar

    Hi, i think that i saw you visited my weblog so i came to “return the favor”.I am trying to find things to enhance my site!I suppose its ok to use some of your ideas!!

  2. Haircuts avatar

    constantly i used to read smaller articles or reviews that also clear their motive,and that is also happening with this piece of writing which I am reading here.

  3. KAYSWELL avatar

    I am regular reader, how are you everybody? This post posted at this web page is genuinely pleasant.

  4. wildsino avatar

    [6886]wildsino অফিসিয়াল লগইন | সেরা অনলাইন স্লট ও বিকাশ ডিপোজিট,wildsino অ্যাপ ডাউনলোড করে সেরা অনলাইন স্লট গেমের অভিজ্ঞতা নিন। বিকাশ দিয়ে সহজে ডিপোজিট করুন এবং দ্রুত লগইন করে খেলা শুরু করুন। visit: wildsino

Leave a Reply

Your email address will not be published. Required fields are marked *

Lucas Brey

I’m Lucas Brey, a travel blogger sharing practical guides, hidden gems, and honest tips from the road. Follow along for smart itineraries, great food finds, and stories worth bookmarking.

Tags