From nobody Wed Mar 27 22:20:03 2024 X-Original-To: freebsd-fs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V4h1x41dwz5Fb7d for ; Wed, 27 Mar 2024 22:20:21 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V4h1w64gJz4tWq for ; Wed, 27 Mar 2024 22:20:20 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-1e04ac4209eso2689035ad.1 for ; Wed, 27 Mar 2024 15:20:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711578019; x=1712182819; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=gfHZVCT9WpN5LLcLoGDtfiSilV5HqHGEIU8i8IUkT9g=; b=Xqi3uHQhEnQxdN8PRASNlFjr1MfiSw0FyP9bEXKZIWf7BH2+cvo/b0nqDZWK5hsdmS FsWp0LZTjly0truUcADQ31PjGNhYsUfoGZEuxzOxGdxHSs1XGJi9WYNQhy1vlOqC37+i E5gbfmHeQdT5gfnOP+Q111e7tgpZAURFcl9aTLpMx3TxFV4csd8iy9Qab9mBh/vCW1z+ 93SryNerCtC7BuDor+GKmLi4aDNKJOTKA4wopXPVsUmeHJwR1CoJ3G10hIqAOvkmfyLD ZJBbfS3qFFfcRWUGD75Ep4/YANaEnV91/KfNaLdpcndquka2aPhGtLlFMs+TkxFpoPhv bLsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711578019; x=1712182819; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gfHZVCT9WpN5LLcLoGDtfiSilV5HqHGEIU8i8IUkT9g=; b=QpI8b8VOFa6WYQD8MzxJlWaPwRWLvZLRd8Qk7VXq60ADI/mAi+7BQZt6CkYyXkRvCS Zn8+AH/aFl9vsflvKUzBP73MylkNyUX0/VRi8F8cm3q1ZHu9YKTI33t/JTpU7+TPFcNG XVfyOVyYKlAubPs7LsgQODrZ14N5r8GQq0oxQvgaIRbwa9FvFZKMBuhRNTZmKAYH+9+3 24yUq773yz/7dcPd0E3ypfvQxgpkEqJdUT4aQkHpNFM6V6Nv2DjGwuqxjAZlyCji+yFw Y8UfxRDtnFnXeWyq60DYsrzKonBQfn3KGtSIF3JARaSUCzBm7QGAKuCOTfZ8w2gJmbb2 /mYQ== X-Gm-Message-State: AOJu0YzpkQ1qSaWyiL2XoTezMSbVVNStgXuxrQPIHSxMLiwVNz7Vtfvk 5iFgVPizvnJMVvRq49qnXPFHeXZ8YtMStafvsMLrfRONAT2NEYlYmYhoXXor1X+pf0YBBzypqQr ZO/7CT9wDXCE0UmzKt/neUyBKSzZha3s= X-Google-Smtp-Source: AGHT+IEDq44AqlEGESYt3xIhytTK69MQXwhjBQprYG5txvScLx+WSUJEMy1BlEt9JmVg8Xyro1xWX7kVj3Kh1vWu1YQ= X-Received: by 2002:a17:90a:3041:b0:29c:6fc1:17e0 with SMTP id q1-20020a17090a304100b0029c6fc117e0mr1007989pjl.10.1711578018562; Wed, 27 Mar 2024 15:20:18 -0700 (PDT) List-Id: Filesystems List-Archive: https://lists.freebsd.org/archives/freebsd-fs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-fs@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Rick Macklem Date: Wed, 27 Mar 2024 15:20:03 -0700 Message-ID: Subject: Re: Kerberised NFSv4 - everyone gets mapped to nobody on file access To: Andreas Kempe Cc: freebsd-fs@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[] X-Rspamd-Queue-Id: 4V4h1w64gJz4tWq On Wed, Mar 27, 2024 at 10:17=E2=80=AFAM Andreas Kempe wrote: > > On Tue, Mar 26, 2024 at 05:54:38PM -0700, Rick Macklem wrote: > > On Tue, Mar 26, 2024 at 5:33=E2=80=AFPM Rick Macklem wrote: > > > > > > Take a look at a packet capture in wireshark. > > > Check that the @domain part of Owner and Owner_group attributes are > > > the same and it is not a string of digits. > > Oh, and just fyi, you can use tcpdump to capture the packets, something= like: > > # tcpdump -s 0 -w out.pcap host > > and then you can look at out.pcap whereever it is convenient to > > install wireshark. > > (I run it on this windows laptop.) > > Don't bother to try and look at NFS with tcpdump. It doesn't know how > > to decode it. > > > > > If the domain is not the same, you can use the -domain command line o= ption > > > on nfsuserd to set it. > > > (Since this "domain" is underdefined, I'd suggest only ascii characte= rs and > > > all alphabetics in lower case.) > > > If the client sends a string of digits, check to make sure the sysctl > > > vfs.nfs.enable_uidtostring is set to 0. > > > > > I'm using lysator.liu.se as the domain on both client and server. It > seems to work since listing files give correct owners. > > I have dumped the traffic from mounting and creating a file named > test file that shows up as owned by nobody. I get the following call > made > > NFS 438 V4 Call (Reply In 131) Open OPEN DH: 0x30a4c0aa/t= estfil > > In the OPEN (18) opcode, owner is set to > > 0000 af 16 00 00 93 fc 00 00 07 76 0d 00 > > while the server sets owner to ex. kempe@lysator.liu.se as expected > when directory listings are made. Doesn't make sense. What does wireshake show you for the Owner attribute in the setable attributes of the Open arguments. It should flag it as non-UTF8. If you email me the pcap.out as an attachment, I'll look at it in wireshark= . The out.pcap should include both the Open that creates a file and an "ls -l ", so there is a Getattr for the file as well. rick ps: If that is what is in the Owner field, all I can suggest is that was wh= at a getpwnam() returned on the client. Possibly some weirdness with LDA= P. (I never use LDAP. Only a local /etc/passwd.) > > vfs.nfs.enable_uidtostring is 0 on the client machine and I am not > quite able to make sense of what the 12 bytes in the owner field are > supposed to be. They are not the ASCII representation and nither my > user's GID and UID that are both 0x7b02. > > // Andreas Kempe