macports user ...

Peter Danecek Peter.Danecek at bo.ingv.it
Mon Sep 30 07:36:49 PDT 2013


Sorry for this post, which maybe somewhat off-topic, but I am a bit confused now. I had never to go into these details on MacOS so far.

--- snip ---

petr% cat /etc/group | grep admin
admin:*:80:root
_lpadmin:*:98:

petr% id
uid=502(petr) gid=20(staff) groups=20(staff),401(com.apple.access_screensharing),402(com.apple.access_ssh),12(everyone),33(_appstore),61(localaccounts),79(_appserverusr),80(admin),81(_appserveradm),98(_lpadmin),100(_lpoperator),204(_developer)

petr% sudo -u macports ls
sudo: unable to change to runas uid (503, 503): Operation not permitted
sudo: unable to execute /bin/ls: Operation not permitted

--- snap ---

I have a admin account, so I guess I am part of the group admin. Well, there is no entry in /etc/group. I assume it is somewhere else. LDAP? Anyway, from `id` I would assume I am part of group admin and /etc/sudoers contains the line specified below as well. 

Still missing something?
~petr



On Sep 27, 2013, at 17:23 , Rainer Müller <raimue at macports.org> wrote:

> On 2013-09-27 16:54, Joshua Root wrote:
>> On 2013-9-28 00:45 , Peter Danecek wrote:
>>> 
>>> Hi all,
>>> 
>>> I have some doubt about the the user macports and how it is used exactly. From what I understood most operations when installing MacPorts are performed as macports user, files belong to macports user etc.
>>> 
>>> Now I am trying to setup some new port and would need to do some manual testing, i.e. do some operation as macports user. I tried to su to macports user, but this would not work. Any trick how this should be done?
>> 
>> sudo -u macports ...
>> 
>> Actually I think su would work too, but you'd have to run it as root
>> since there's no password.
> 
> su does not work as the macports user does not have a useful login shell:
> 
> $ dscl . -read /Users/macports UserShell
> UserShell: /usr/bin/false
> 
> sudo -u macports should definitely work. In case it does not, check your
> /etc/sudoers whether you have a configuration which would prevent to
> switch to another user than root. The default on Mac OS X would allow
> the group 'admin' to do everything ("%admin ALL=(ALL) ALL").
> 
> Rainer
> _______________________________________________
> macports-dev mailing list
> macports-dev at lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/macports-dev

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1762 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20130930/314be851/attachment.p7s>


More information about the macports-dev mailing list