On Thu, 14 Oct 2004 00:11:07 +0000
Nick Smith <nick@computernick.com> wrote:
> Jochen Schalanda wrote:
>
> > On 10/13/2004 09:45 PM, Nick Smith wrote:
> >
> >> # adduser -d /home/vmail -s /bin/false vmail
> >> # uid=`cat /etc/passwd | grep vmail | cut -f 3 -d :`
> >> # groupadd -g $uid vmail
> >> # mkdir /home/vmail
> >> # chown vmail: /home/vmail
> >>
> >> in the groupadd line what does $uid mean?
> >>
> >> thanks
> >>
> >> nick
> >>
> >>
> >> --
> >> gentoo-user@gentoo.org mailing list
> >>
> >>
> >
> > $uid will be the output of the command chain
> >
> > cat /etc/passwd | grep vmail | cut -f 3 -d :
> >
> > This will print the uid of the user vmail.
> >
> > Jochen
> >
> > --
> > gentoo-user@gentoo.org mailing list
> >
> but it doesnt tell me anything, nothing happens and i cant do groupadd
> -g to finish the process, so how can i find out $uid?
nick - engage brain for heaven's sake
look at /etc/passwd - did the vmail user get created? if so what is its
user id?
I suggest that if the output cat /etc/passwd | grep vmail | cut -f 3 -d:
is blank its likely the vmail user did not get made.
start chopping the expression into smaller bits: what is the output ogf
the following?
cat /etc/passwd|grep vmail
try it with a known user
cat /etc/passwd|grep nick
and if all you want is the user id of a user, on a one off basis, simply
parse /etc/passwd with your eyes!
another nick :)
>
> nick
>
> --
> gentoo-user@gentoo.org mailing list
--
Nick Rout <nick@rout.co.nz>
--
gentoo-user@gentoo.org mailing list