LoginSignup
1
4

More than 5 years have passed since last update.

nologinアカウントのcronを設定する方法

Posted at

はじめに

ログインシェルにnologinが指定されているアカウントで、cronを指定する方法を記述します。

nologinが設定されているアカウント例

apache:x:48:48:Apache:/var/www:/sbin/nologin

nologinとは

そのアカウントにログインすることは出来ません。ログインしようとすると、以下のようなエラーメッセージが表示されます。

$ su - apache
This account is currently not available.

設定方法

crontabは、-u userでcrontabを設定するユーザーを指定できます。これにより、nologinアカウントにcronを設定できます。

$ crontab -u apache -e

参考

1
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
4