From owner-freebsd-pkg@freebsd.org Fri Dec 2 14:47:35 2016 Return-Path: Delivered-To: freebsd-pkg@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 039E5C629D9 for ; Fri, 2 Dec 2016 14:47:35 +0000 (UTC) (envelope-from lifanov@mail.lifanov.com) Received: from mail.lifanov.com (mail.lifanov.com [206.125.175.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E87E012D7 for ; Fri, 2 Dec 2016 14:47:34 +0000 (UTC) (envelope-from lifanov@mail.lifanov.com) Received: from [10.14.0.54] (unknown [198.85.229.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.lifanov.com (Postfix) with ESMTPSA id B14E6239487 for ; Fri, 2 Dec 2016 09:47:27 -0500 (EST) Subject: Re: Find pkg added users/groups To: freebsd-pkg@freebsd.org References: From: Nikolai Lifanov Message-ID: Date: Fri, 2 Dec 2016 09:47:25 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-pkg@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Binary package management and package tools discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2016 14:47:35 -0000 On 12/2/16 7:00 AM, freebsd-pkg-request@freebsd.org wrote: > > pkg info -l lets me see what files a package adds. Is there any easy way > to see what users and groups (if any) a package adds? > pkg shell to the rescue: $ echo " SELECT DISTINCT users.name FROM packages,pkg_users,users WHERE packages.id=package_id AND users.id=user_id AND packages.name='virtualbox-ose'; " \ | pkg shell vboxusers You can do the same thing for groups. - Nikolai Lifanov