Should a deployment user have his shell set to /bin/false?

I deploy web applications by "sandboxing" each application under its own UNIX user account, behind a common nginx reverse proxy that also serves static files. Each account runs the application server, to which nginx will forward requests via fcgi. Each user's home folder hosts the application code and static files, which of course need to be readable by nginx.

I'm trying to secure this setup as much as possible, and /bin/false came up while reading up on the topic.

If I was to set the application user's shell to /bin/false, what would I gain, in terms of security?

1
задан 1 March 2017 в 17:36
1 ответ

Этот вопрос может иметь отношение к делу: https://unix.stackexchange.com/questions/28888/why-does-the-bin-user-need-a-login-shell.

В общем, одно из преимуществ использования /bin/false (или, что предпочтительнее, /sbin/nologin) - это неудачные попытки входа в систему, даже в ситуации, когда это было бы разрешено в ином случае. Более подробно об этом говорится, например, в https://www.digitalocean.com/community/tutorials/how-to-restrict-log-in-capabilities-of-users-on-ubuntu.

Таким образом, это является одной из составляющих защиты от злоупотребления/ грубого принуждения.

1
ответ дан 3 December 2019 в 23:33

Теги

Похожие вопросы