[clue-tech] Running a command as a user who can't log in

Jed S. Baer cluemail at jbaer.cotse.net
Sun Aug 17 20:52:55 MDT 2008


On Sun, 17 Aug 2008 19:02:10 -0600
Jed S. Baer wrote:

> Hi Folks.
> 
> Well, I was a bit surprised by this.
> 
> I'm wanting to execute a command as a user that has /sbin/nologin as its
> shell, from a logrotate conf file, as in:
> 
>   prerotate
> 	su -c /usr/bin/webalizer webalizer
>   endscripts
> 
> But when I try it from the command line (as root), just as it's typed
> above, I get
> 
>   This account is currently not available.
> 
> I'm wondering if this restriction applies only when doing it from an
> interactive session, and will work fine when executed in the context of
> cron. I guess I can experiment with that.

Well, my experimentation shows it works in cron, at least in webalizer's
crontab. I guess I'll know sometime soon if it works in the logrotate.


More information about the clue-tech mailing list