Need Help on User Admin Task
David A. Bandel
david
Mon May 17 11:48:44 PDT 2004
On Sun, 29 Jun 2003 18:51:14 +0800
Chong Yu Meng <chongym at cymulacrum.net> wrote:
> Hello All!
>
> Something that has been bugging me for a while. This may seem like an
> elementary task (which is probably why I can't find information on it
> using Google) but I need to create a user with the following
> characteristics :
>
> - using 'useradd' command
> - no login shell
> - owner of a daemon that runs under that user.
>
> Something like the user that apache runs under. What is the full
> command, including options, that I should execute? The reason for this
>
> sudden need is because of something that affects Jakarta Tomcat.
>
The useradd command itself is fairly simple. However ...
1. no login shell: on most systems, this is not feasible. If
/etc/shells exists, it will be used, and the user cannot be used without
a shell (/bin/false qualifies as a "shell"). Even if you only need the
user to own a daemon, give the user a shell -- just no password (lock
the account -- default until you set a password).
2. do you mean a user that owns a daemon, or when that user is called a
command runs? IF the second, the command must be put in /etc/shells and
that becomes that users "shell" (like the shutdown user)
assuming you want a daemon owned by a user:
useradd -d /path/to/daemon -s /bin/false username
using -u allows you to specify a specific UID
using -g allows you to specify a specific GID (must exist, use groupadd
to add one)
using -m allows you to create a home directory (you probably don't want
to do this)
the -d adds a "home directory" path
the -s is the shell name (make sure the shell exists in /etc/shells if
your distro uses it)
HTH,
David A. Bandel
--
Focus on the dream, not the competition.
Nemesis Racing Team motto
GPG key autoresponder: mailto:david_key at pananix.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.linux-sxs.org/pipermail/linux-users/attachments/20030629/112229f0/attachment.pgp
More information about the Linux-users
mailing list