[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Mailman pre-depend

Tollef Fog Heen <tollef@add.no> wrote:
> In order to ensure that the list user exists in the system password
> tables, I need to check that, using the functions in libnss, so
> grepping /etc/{passwd,group} doesn't work.

> So, I use the following:

> if ! python -c 'import grp; print pwd.getgrnam("list")' > /dev/null 2>&1 ; then

You should use id, chown or find instead and get rid of

1) Stolen from fbgetty:
if ! id -u list >/dev/null 2>&1; then

generate $temporary_file
if ! chown list $temporary_file > /dev/null 2>&1 ; then

if ! find /tmp/ -user list > /dev/null 2>&1 ; then

findutils, shellutils and fileutils are Essential: yes.
             cu andreas
Hey, da ist ein Ballonautomat auf der Toilette!
Echelon: sex violence tower XXX Boom human rights Islam Kate Winslet
vim:ls=2:stl=***\ Sing\ a\ song.\ ***

Reply to: