[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Impossible to change ownership of a file to user when user is UID 0



On Mon, May 1, 2023 at 10:50 AM Greg Wooledge <greg@wooledge.org> wrote:
>
> On Mon, May 01, 2023 at 04:37:34PM +0200, Pierre Willaime wrote:
> > On this system (not installed by me), my user has an UID and GID of 0 in
> > /etc/passwd. Several users share root privileges like this on the server.
>
> >
> >       root@server:~# chown user /home/user/.ssh/authorized_keys
> >       root@server:~# ls -la /home/user/.ssh/authorized_keys
> >       -rw------- 1 root user 395  1 mai   15:38 .ssh/authorized_keys
>
> Is "user" one of the accounts with UID 0?  If so, this is absolutely
> expected behavior.  ...

Ugh, that sounds like a bad idea.

I'd love to hear the backstory about why that was done.

Jeff


Reply to: