Date: Tue, 23 Jun 2015 11:43:12 -0700 From: Chris Stankevitz <chrisstankevitz@gmail.com> To: freebsd-questions <freebsd-questions@freebsd.org> Subject: chown silently fails to respect NSS Message-ID: <CAPi0psuHon-nQHZnny32_m8F5FQKoVN4gVh%2BVmn1pnwRuUN0ZA@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPi0psuHon-nQHZnny32_m8F5FQKoVN4gVh%2BVmn1pnwRuUN0ZA>