grappling with users

Giorgos Keramidas keramida at ceid.upatras.gr
Thu Apr 14 23:31:21 PDT 2005


On 2005-04-15 10:33, Timothy Smith <timothy at open-networks.net> wrote:
> whats the correct method of creating a deamon user account, which you
> can use to start a deamon process but can't be logged into. so far i
> have not seen a single good explaination or example of this below is
> my svn user, who has /sbin/nologin, but can't be used because it runs
> the no login shell.  whats the correct way to do this?
>
> %su svn -c "svnadmin create /usr/local/svn/PubWare"
> This account is currently not available.

I don't know if this is the Correct(TM) way, but you can use the -m
option of su(1), and change your id from superuser to the user locked
out with /sbin/nologin:

: gothmog:/root# grep ^nobody /etc/passwd
: nobody:*:65534:65534:Unprivileged user:/nonexistent:/usr/sbin/nologin
: gothmog:/root# su -m nobody
: root at gothmog[9:29am]/root> id
: uid=65534(nobody) gid=65534(nobody) groups=65534(nobody)



More information about the freebsd-questions mailing list