From owner-freebsd-questions@freebsd.org Fri Dec 4 13:31:24 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A77DA4153D for ; Fri, 4 Dec 2015 13:31:24 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from mail-wm0-x22e.google.com (mail-wm0-x22e.google.com [IPv6:2a00:1450:400c:c09::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1FFF310F9 for ; Fri, 4 Dec 2015 13:31:23 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: by wmec201 with SMTP id c201so74260247wme.0 for ; Fri, 04 Dec 2015 05:31:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bris-ac-uk.20150623.gappssmtp.com; s=20150623; h=date:from:message-id:to:subject:reply-to:in-reply-to; bh=5sR2fL8tlpbc63ssESwYb/eQjR3hPNhiDLH2BcaXovg=; b=OPVEtaN3wILAIczwPkEmYEFttR3AztVKiKtotl6F70KwnqVQZICASjbTtkIirKQZk+ 2N1so/vOOOhaX50pmHky9RCYZeCcF2Vph60wWTLMpNI7wuxl/LddXzze0gXQheXHhHOb hlFG4C3zYDX98Fsem6pjUfsBxtM8MqjdM3u/QvadcLmtAq6kDw4clraOmEFOe8klPdUf TEmfzEHUu+cw94I6Kub6sZx0S+MpRTHiSFUTRChCvv7/JY/ADlhC/m6jj8vgrtxB+ROk Y3fh5DvRqLvAgQyztX2Txq8D33xymsRiUzUgcmxa1WY41tNn7dc1XZIOzrPJ33aDyxbE 08FA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:message-id:to:subject:reply-to :in-reply-to; bh=5sR2fL8tlpbc63ssESwYb/eQjR3hPNhiDLH2BcaXovg=; b=T34HV71i42WFLgweq/x4eqDh4lf2ZWwxNQBBAFamQ/YpH4IIoDAC4dRPtiSuHJxEZ+ QYDNe3zUPOP0bC73xhtzbqY2CVMzuWSCbgHpe1qBmWtV4H2hDxViG4Vd/qzHcztf1ZJj KE9yeKYcwNaJ6G3OZVOsSYVAt/bUbxpdK3+fY5Mj+vXdESHBwYK+MFfoFBc9poxeLaoX +y8VSd5JBb/mpiSnkxrSUlKPDt04Mszssd3MxBadBEoKg9IzAy4Fzno6JXKkXLRbjONJ GAiHCjgVO4Xz/PsYwtYQRkHp+YbpluImLTiO1A6UWeuGkHBcQjgXtzo5P9ypnaWY6gEk kb2Q== X-Gm-Message-State: ALoCoQmyUKEhJYqDu6L98HWGMj2qDMM/EtF0cJMHCdCQTkfYPoBzkQjIBiLnh6G1XI1cYxgkBt9XaA1iSdfNBbtYye+hbD/3ag== X-Received: by 10.28.188.84 with SMTP id m81mr4939630wmf.38.1449235881815; Fri, 04 Dec 2015 05:31:21 -0800 (PST) Received: from mech-as222.men.bris.ac.uk (mech-as222.men.bris.ac.uk. [137.222.170.4]) by smtp.gmail.com with ESMTPSA id e83sm3520137wmc.23.2015.12.04.05.31.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Dec 2015 05:31:21 -0800 (PST) Date: Fri, 04 Dec 2015 05:31:21 -0800 (PST) X-Google-Original-Date: Fri, 4 Dec 2015 13:31:20 GMT Received: from mech-as222.men.bris.ac.uk (localhost [127.0.0.1]) by mech-as222.men.bris.ac.uk (8.15.2/8.15.2) with ESMTP id tB4DVKSN092106; Fri, 4 Dec 2015 13:31:20 GMT (envelope-from mexas@mech-as222.men.bris.ac.uk) Received: (from mexas@localhost) by mech-as222.men.bris.ac.uk (8.15.2/8.15.2/Submit) id tB4DVKsK092105; Fri, 4 Dec 2015 13:31:20 GMT (envelope-from mexas) From: Anton Shterenlikht Message-Id: <201512041331.tB4DVKsK092105@mech-as222.men.bris.ac.uk> To: freebsd-questions@freebsd.org, lists@bertram-scharpf.de Subject: Re: adduser - gid error? Reply-To: mexas@bris.ac.uk In-Reply-To: <20151204130518.GA8421@becker.bs.l> X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 13:31:24 -0000 >On Friday, 04. Dec 2015, 03:04:55 -0800, Anton Shterenlikht wrote: >> For the user I added today I got: >> >> newuser:*:1004:4294967295: ... >> >> Does this look right? > >4294967295 is obviously 0xffffffff in hexadecimal and -1 if >seen as a signed value what is commonly used in C as a >return value to indicate an error. > >> pw: gid `4294967295' has already been allocated >> adduser: ERROR: There was an error adding user (newuser). > >"adduser" is a shell script. I had a look at it but I don't >know how you managed to generate that number. The script >calls "pw", that is written in C and probably cannot >increment the maximum 32-bit value. # pw useradd newuser pw: gid `4294967295' has already been allocated # Now I'm worried... >> What shall I do? > >Untested: You should be save by editing /etc/groups and change >the value by hand. Then call "vipw" to edit /etc/passwd. >After that you need to find files on disk with the wrong >group id. You can do something like > > # find /home /var -group 4294967295 -exec ls -l '{}' \; > # find /home /var -group 4294967295 -exec chgrp 1004 '{}' \; > >Did I forget anything? I'll give it a go if all else fails, but I worry that my system is not right. Thanks Anton