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

Re: Debconf code for getting usernames list

On 23/10/14 11:50, Nikos Andrikos wrote:
> What is the proper way to check that each member of the $RET list is a
> valid username and if not prompt the user to specify a new correct
> list?

This might be helpful:

# usage: if is_username_valid root; then echo yes; fi
is_username_valid () {
    getent passwd -- "$1" >/dev/null


Reply to: