From owner-freebsd-questions@FreeBSD.ORG Tue Jun 23 18:43:14 2015 Return-Path: Delivered-To: freebsd-questions@nevdull.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70708B3E for ; Tue, 23 Jun 2015 18:43:14 +0000 (UTC) (envelope-from chrisstankevitz@gmail.com) Received: from mail-lb0-x231.google.com (mail-lb0-x231.google.com [IPv6:2a00:1450:4010:c04::231]) (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 EEB8B751 for ; Tue, 23 Jun 2015 18:43:13 +0000 (UTC) (envelope-from chrisstankevitz@gmail.com) Received: by lbbwc1 with SMTP id wc1so12402392lbb.2 for ; Tue, 23 Jun 2015 11:43:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=kpYYGlZGCblnNKy5Eh+4YBv2R+zWGF8p9jWGvbXOAks=; b=w9A+fXNVHB8jCVc/wovNjaB3jbgoDIA+u5lUXpzIBRlSwOywi4PXFW5IYw14vb4s12 vAlnkEhM+VMs8fh2cyZCyzZund0Ls76HNhLKQoEQMTizhrQVeymheezikSO9F3Jzu7Pw Waln7PyYAOl1yYqoldcnCB5OdpjN+oaaRDHfe3+IF5s2y3J8WWW6kk15D5zXzBfF5BV2 /dxCjmqcKRkhPoihtGnzfaFxff8MjxxydPjhkDa+uiIfMymgTlbt11QqKjMYe4jJVJu+ xJalkX+5C8qGhHT1Bp79OOXzpRaZffaPfJ9yrwXOOUxq2KdhvhlIkLq0fL/eoZjiV5aS 2n5w== MIME-Version: 1.0 X-Received: by 10.112.151.178 with SMTP id ur18mr36936965lbb.59.1435084992185; Tue, 23 Jun 2015 11:43:12 -0700 (PDT) Received: by 10.25.42.146 with HTTP; Tue, 23 Jun 2015 11:43:12 -0700 (PDT) Date: Tue, 23 Jun 2015 11:43:12 -0700 Message-ID: Subject: chown silently fails to respect NSS From: Chris Stankevitz To: freebsd-questions Content-Type: text/plain; charset=UTF-8 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: Tue, 23 Jun 2015 18:43:14 -0000 Hi, Why is chown is silently failing to chown a file to a winbind user that is listed in 'getent passwd'? I can chown to other users on the system. I can also chown to arbitrary numbers as long as they do not match those from winbind. My guess: "uid == (uid_t)-1" which causes chown to silently fail. Perhaps getpwnam doesn't work with NSS? Thank you, Chris === root@zinc:~/temp # ls -l total 0 root@zinc:~/temp # pwd /root/temp root@zinc:~/temp # getent passwd MYDOMAIN\\cstankevitz MYDOMAIN\cstankevitz:*:4294967295:4294967295:Chris Stankevitz:/home/MYDOMAIN/cstankevitz:/bin/false root@zinc:~/temp # touch file.txt root@zinc:~/temp # ls -l total 1 -rw-r--r-- 1 root wheel 0 Jun 23 11:34 file.txt root@zinc:~/temp # chown -v -v MYDOMAIN\\cstankevitz file.txt root@zinc:~/temp # ls -l total 1 -rw-r--r-- 1 root wheel 0 Jun 23 11:34 file.txt