Mengapa Beberapa Pengguna Sistem Memiliki / usr / bin / false sebagai Shellnya?

Daftar Isi:

Mengapa Beberapa Pengguna Sistem Memiliki / usr / bin / false sebagai Shellnya?
Mengapa Beberapa Pengguna Sistem Memiliki / usr / bin / false sebagai Shellnya?

Video: Mengapa Beberapa Pengguna Sistem Memiliki / usr / bin / false sebagai Shellnya?

Video: Mengapa Beberapa Pengguna Sistem Memiliki / usr / bin / false sebagai Shellnya?
Video: PS5 Coil Whine - What Is It and Can I Fix It? - YouTube 2024, April
Anonim
Setelah Anda mulai menggali sistem Linux, Anda mungkin menemukan beberapa hal yang membingungkan atau tidak diharapkan, seperti / usr / bin / false, misalnya. Mengapa ada di sana dan apa tujuannya? Posting SuperUser Q & A saat ini memiliki jawaban atas pertanyaan pembaca yang ingin tahu.
Setelah Anda mulai menggali sistem Linux, Anda mungkin menemukan beberapa hal yang membingungkan atau tidak diharapkan, seperti / usr / bin / false, misalnya. Mengapa ada di sana dan apa tujuannya? Posting SuperUser Q & A saat ini memiliki jawaban atas pertanyaan pembaca yang ingin tahu.

Sesi Tanya & Jawab Hari ini hadir untuk memberi kami SuperUser - subdivisi Stack Exchange, pengelompokan situs web Q & A berbasis komunitas.

Pertanyaan

Pembaca SuperUser user7326333 ingin tahu mengapa beberapa pengguna sistem memiliki / usr / bin / false sebagai shell mereka:

Why do some system users have /usr/bin/false as their shell? What does that mean?

Mengapa sebagian pengguna sistem memiliki / usr / bin / false sebagai cangkangnya?

Jawabannya

Kontributor superuser duDE, Toby Speight, dan bbaassssiiee memiliki jawaban untuk kami. Pertama, duDE:

This helps to prevent users from logging onto a system. Sometimes you need a user account for a specific task. Nevertheless, no one should be able to interact with this account on the computer. These are, on one hand, system user accounts. On the other hand, this is an account for which FTP or POP3 access is possible, but just no direct shell login.

If you look more closely at the /etc/passwd file, you will find the /bin/false command as a login shell for many system accounts. Actually, false is not a shell, but a command that does nothing and then also ends with a status code that signals an error. The result is simple. The user logs in and immediately sees the login prompt again.

Dilanjutkan dengan jawaban dari Toby Speight:

These users exist to be the owner of specific files or processes and are not intended to be login accounts. If the value of the “shell” field is not listed in /etc/shells, then programs such as FTP daemons do not allow access. Additionally, for programs that do not check /etc/shells, they make use of the fact that /bin/false will immediately return and deny an interactive shell.

Dan jawaban akhir kami dari bbaassssiiee:

Some users have /usr/bin/false, others have /sbin/nologin, or they may even have /usr/bin/passwd. They can either be system users that are needed to isolate program permissions or human users of programs that use the password files for authentication.

Memiliki sesuatu untuk ditambahkan ke penjelasan? Bicaralah di komentar. Ingin membaca lebih banyak jawaban dari pengguna Stack Exchange yang paham teknologi lainnya? Lihat diskusi lengkap di sini.

Kredit Gambar: OpenStack Docs (Proyek OpenStack)

Direkomendasikan: