git: tools/pw-update.sh: Allow to create user 'toor' of duplicate UID

Aaron LI aly at crater.dragonflybsd.org
Fri Feb 3 01:42:25 PST 2023


commit 54af8c6b6873d44df166966f7454bb4cf53fbaac
Author: Aaron LI <aly at aaronly.me>
Date:   Fri Feb 3 09:49:23 2023 +0800

    tools/pw-update.sh: Allow to create user 'toor' of duplicate UID
    
    The 'toor' user has duplicate UID of 0 as 'root', and it also has an
    empty shell field.  This caused problem for the 'pw-update.sh' to
    handle.  If the user/admin deliberately removed the 'toor' user, then
    this script was unable to add it back, which breaks the 'preinstall'
    target and thus 'installworld' failed.
    
    Use the '-o' option for 'pw useradd' to allow to create users of
    duplicate UIDs.  In addition, quote the shell field to handle the empty
    case.
    
    Bug: https://bugs.dragonflybsd.org/issues/3332

Summary of changes:
 tools/pw-update.sh | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/54af8c6b6873d44df166966f7454bb4cf53fbaac


-- 
DragonFly BSD source repository


More information about the Commits mailing list