News for hackers. Stuff that matters.
Re:Linux 5.6 is the most exciting kernel in years by zdw on Sunday February 09, 2020 @07:36PM (#22285437)
I wasn't able to find documentation for using CIFS as / - is there a guide somewhere?

What are the advantages of this as compared with NFS?

Re:Linux 5.6 is the most exciting kernel in years by nrclark on Monday February 10, 2020 @02:53PM (#22292577)
I can only speak from personal experience, so don't take this as true for everybody.

But for me, NFS has always been a colossal pain to use. The server has to run in kernel-space. Shares have to be enumerated in /etc. There are a couple of userspace options, but I've never been able to make them work reliably. Once I do get it working, it hangs all the time for no easy-to-debug reason. Also it needs multiple ports to be open, and it expects UID and GID to be the same on client and server.

CIFS has its problems for sure. But it's been pretty straightforward for me every time I've had to use it. If I was trying to set up a production-line machine to flash Linux-based devices, I'd choose CIFS every time because it's so much less hassle. And now that it's rootfs-capable, I just might be able to do it.

Re:Linux 5.6 is the most exciting kernel in years by henry_flower on Sunday February 09, 2020 @09:50PM (#22286032)

  https://www.kernel.org/doc/Documentation/filesystems/cifs/cifsroot.txt
Re:Linux 5.6 is the most exciting kernel in years by voltagex_ on Monday February 10, 2020 @12:07AM (#22286552)
>A CIFS root mount currently requires the use of SMB1+UNIX Extensions which is only supported by the Samba server. SMB1 is the older deprecated version of the protocol but it has been extended to support POSIX features (See [1]). The equivalent extensions for the newer recommended version of the protocol (SMB3) have not been fully implemented yet which means SMB3 doesn't support some required POSIX file system objects (e.g. block devices, pipes, sockets).

As a result, a CIFS root will default to SMB1 for now but the version to use can nonetheless be changed via the 'vers=' mount option. This default will change once the SMB3 POSIX extensions are fully implemented.

Who thought re-enabling uses of SMB1 was a good idea?

Re:Linux 5.6 is the most exciting kernel in years by MrMorden on Monday February 10, 2020 @05:47PM (#22294250)
Re:Linux 5.6 is the most exciting kernel in years by jlokier on Monday February 10, 2020 @09:23AM (#22289305)
It's not just CIFS root that needs SMB1.

SMB1 has to be used any time you need the POSIX extensions, with Samba at the server side and Linux at the client side.

I find it comes up reasonably often, because Samba is so configurable. For example remapping user ids, or mapping user-group permission bits; these are hard or impossible to do in NFS, depending on available NFS server version.

Re:Linux 5.6 is the most exciting kernel in years by yjftsjthsd-h on Monday February 10, 2020 @02:07AM (#22287012)
I think the real question is: Is SMB1 less secure than NFS?
Re:Linux 5.6 is the most exciting kernel in years by zaarn on Monday February 10, 2020 @03:07AM (#22287252)
Probably not since NFS to my recollection barely support anything resembling transport encryption, but it allows Authentication if you like Kerberos.
Re:Linux 5.6 is the most exciting kernel in years by lokedhs on Monday February 10, 2020 @05:42AM (#22287954)
NFS has supported transport encryption since as long as I can recall. It's enabled by the sec=krb5p mount option.
Re:Linux 5.6 is the most exciting kernel in years by fulafel on Monday February 10, 2020 @06:23AM (#22288160)
It can also be secured using IPsec (or other host-to-host supporting vpn that can have per protocol security associations)
Re:Linux 5.6 is the most exciting kernel in years by zaarn on Monday February 10, 2020 @09:13AM (#22289221)
SMB doesn't require me to setup a whole VPN connection (with it's own problems) just to get secure transport going.
Re:Linux 5.6 is the most exciting kernel in years by fulafel on Monday February 10, 2020 @10:39AM (#22290001)
True. But neither does NFS like the kerberos comment you replied to described :)

A third way to do this with NFS is to forward the TCP connection over stunnel, ssh forwarding or other similar thing.

Re:Linux 5.6 is the most exciting kernel in years by zaarn on Monday February 10, 2020 @06:13AM (#22288102)
As mentioned, if you like Kerberos. It's not the nicest way to do anything. Kerberos is also only supported if you (can) use NFSv4, NFSv3 doesn't support Kerberos on all clients.
Re:Linux 5.6 is the most exciting kernel in years by justryry on Monday February 10, 2020 @10:31AM (#22289930)
NFSv3 is very dead.

I like Kerberos a good bit and I think the complexity of running an LDAP/Kerberos infrastructure is greatly over estimated, but it is disappointing that none of the theorized alternatives ever really appeared. Last I read, LIPKEY was the only serious contender and there were some security concerns that got it nixed.

Re:Linux 5.6 is the most exciting kernel in years by MrMorden on Monday February 10, 2020 @05:49PM (#22294263)
And if you don't use Kerberos, NFS has no authentication. For extra credit, it's generally paired with NIS, so everyone can see everyone else's password hashes. What's not to like for an attacker?
Re:Linux 5.6 is the most exciting kernel in years by yori on Monday February 10, 2020 @06:13AM (#22288100)
Re:Linux 5.6 is the most exciting kernel in years by pkaye on Sunday February 09, 2020 @07:45PM (#22285481)
CIFS is I think the protocol used on Windows and SAMBA.
Re:Linux 5.6 is the most exciting kernel in years by jagger27 on Sunday February 09, 2020 @07:51PM (#22285507)
Yes, ish. CIFS is the protocol that came before SMB, but people still use the term to describe modern Windows SMB or Samba.
Re:Linux 5.6 is the most exciting kernel in years by burfog on Sunday February 09, 2020 @08:22PM (#22285650)
SMB was first. CIFS is a rebranding that happened when Microsoft was forced to release documentation for the protocol.
Re:Linux 5.6 is the most exciting kernel in years by derefr on Sunday February 09, 2020 @09:36PM (#22285955)
Yes, but CIFS was a rebranding of SMB1; successive versions of SMB have just been called SMB. So first there was SMB, and then CIFS, and then (and now) it's all been just SMB. The only ones still using the term "CIFS" at this point are the Linux/Samba folks.
Re:Linux 5.6 is the most exciting kernel in years by burfog on Sunday February 09, 2020 @10:24PM (#22286202)
It's a case of running the Common Internet File System on top of the Server Message Block protocol.

SMB isn't just for filesystems. It is also used for printing, among other things. CIFS is the filesystem.

Outside of Linux/Samba folks, neither term is popular. Users say "Windows share" or "shared drive" or "network folder" or something like that.

Re:Linux 5.6 is the most exciting kernel in years by blattimwind on Sunday February 09, 2020 @08:36PM (#22285698)
Don't see someone call SMB "modern" every day...