Re: pw keeps setting /etc/group to 0600

看板FB_current作者時間12年前 (2013/04/27 12:33), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/9 (看更多)
On Sat, Nov 17, 2012 at 11:20:21AM -0500, Ryan Stone wrote: > Wow. So apparently things are even more broken than I though. Let's play, > "What group am I in?" > > root@group-testing:/usr/home/rstone # cd /tmp > root@group-testing:/tmp # pw groupadd testing > root@group-testing:/tmp # mkdir testdir > root@group-testing:/tmp # chown root:testing testdir/ > root@group-testing:/tmp # chmod g+rwx testdir/ > root@group-testing:/tmp # pw usermod > root@group-testing:/tmp # pw groupmod testing -m rstone > root@group-testing:/tmp # id rstone > uid=1001(rstone) gid=1001(rstone) groups=1001(rstone),0(wheel),1002(testing) > root@group-testing:/tmp # exit > $ id > uid=1001(rstone) gid=1001 groups=1001,0 > $ id rstone > uid=1001(rstone) gid=1001 groups=1001 > $ touch /tmp/testdir/testfile > touch: /tmp/testdir/testfile: Permission denied > $ ls -ld /tmp/testdir/ > drwxrwxr-x 2 root 1002 512 Nov 17 11:07 /tmp/testdir/ > This is not a bug and I think it always was this way. The process you used to su/sudo/whatever to root was not in testing group and didn't magically enter it after you added rstone user to that group. You have to log in again or do stuff like exec su - rstone. -- Mateusz Guzik <mjguzik gmail.com> _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1HUrJ_55 (FB_current)
討論串 (同標題文章)
文章代碼(AID): #1HUrJ_55 (FB_current)