Mounting a share from a Windows PC

The machine 192.168.96.24 is sharing C:\Shared to user SomeAdmin, and from a previous, not so clean but succesful attempt, we know that the following command should work: mount.cifs //192-168-96-24.winprogress.local/Shared /admin/apprentice/myShared -o domain=WINPROGRESS,user='SomeAdmin@WINPROGRESS.LOCAL',sec=krb5,netbiosname=192-168-96-24.winprogress.local --verbose. At this point however, with a PC configured for a different environment, it doesn't, and we're going to fix that.

  1. First try

    Obviously, we 're missing a package.

  2. Installing smbfs

    This looks like a nameserver issue, but the nameserver is outside of our reach.

  3. Fixing the hostname resolution for the Windows PC

    We may yet have to install winbind later on, but for now, we simply create in /etc/hosts a line:

      192.168.96.24   192-168-96-24.winprogress.local 192-168-96-24
    	  

    .. and we try again:

    This time, the problem is permissions: the ordinary user cannot use mount.cifs: the binary needs to be suid-root.

  4. Fixing permissions on mount.cifs

    We need a Kerberos key, and we haven't done anything yet to obtain it.

  5. Trying to get a Kerberos key

    Well, as a matter of fact, the package heimdal-clients is installed on the system. If it hadn't been, the command kinit wouldn't even have been available.

    But Kerberos certainly isn't configured for use with the experimental WINPROGRESS.LOCAL realm.

  6. Configuring Kerberos

    We add a stanza under

    [realms]

    in /etc/krb5.conf:

      <snip>
      WINPROGRESS.LOCAL = {
      kdc = 192.168.127.201 192.168.127.202
      admin_server = 192.168.127.201 192.168.127.202
      }
      <snip>
    	  

    and under

    [libdefaults]

    , we put:

      <snip>
      default_realm = WINPROGRESS.LOCAL
      <snip>
    	  

    [Note]Note

    We 're using IP numbers rather than hostnames, because the nameserving isn't working for the domain winprogress.local.

    ... now we retry:

    [Note]Note

    It appears that this also works:

    apprentice@linux-pc:~$ mount.cifs //192-168-96-24.winprogress.local/Shared /admin/apprentice/myShared -o domain=WINPROGRESS,user='SomeAdmin@WINPROGRESS.LOCAL',sec=krb5