Public bug reported:

My FSTAB so far had this entry
  //10.7.0.231/documents /mnt/nas/documents cifs 
user,noauto,user=paelzer,vers=3.0 0 0

I found after a reboot (to free up of the crashes above) that I need to change 
this.
I wondered why the logins won't work anymore until I realized it was trying to 
authenticate root@<NAS> which is wrong.

So far it had correctly authenticated for user=paelzer.

  //10.7.0.231/documents /mnt/nas/documents cifs
user,noauto,username=paelzer,vers=3.0 0 0

man mount.cifs specifies
username=arg|user=arg
specifies the username to connect as. If this is not given, then the 
environment variable USER is used.Earlier  versions  of  mount.cifs also 
allowed one to specify the username in a user%password or workgroup/user or 
workgroup/user%password to allow the password and workgroup to be specified as 
part of the username. Support for those alternate username formats is now 
deprecated and should no longer  be used.  Users  should  use  the discrete 
password= and domain= to specify those values. While some versions of the cifs 
kernel module accept user= as an abbreviation for this option, its use can 
confuse the standard mount program into thinking that this is a non-superuser 
mount. It is  therefore  recommended to use the full username= option name.

But it seems for me "user=" no more works.
There was a recent security update for samba (server side), but not CIFS utils.
The only component I'd know of in this chain that has changed was the kernel 
part of it.

I tracked this down to the following:
I had so far:
$ grep documents /etc/fstab 
//10.7.0.231/documents /mnt/nas/documents cifs 
user,noauto,user=paelzer,vers=3.0 0 0

Of these "user" is of fstab that is supposed to allow everybody to mount.
and "user=" is for cifs to set the user.

It turns out that "user" + "user=" is equal to only setting "user" and the 
effective login is derived from the current user id.
So a sudo gives me root and without sudo I have my user.

Now that is worth a not in the man page, but not more.
I initially thought the kernel update would be involved and this be part of bug 
1787328, but it isn't this is "normal" behavior.

My mind still is on that other bug with the kernel crash, I think for
this aspect here we would open a bug/proposed change to the cifs man
page to clarify? Other suggestions?

** Affects: cifs-utils (Ubuntu)
     Importance: Low
         Status: Invalid

** Also affects: samba (Ubuntu)
   Importance: Undecided
       Status: New

** No longer affects: linux (Ubuntu)

** Changed in: samba (Ubuntu)
       Status: New => Confirmed

** Changed in: samba (Ubuntu)
   Importance: Undecided => Low

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1787353

Title:
  fstab setting "user" and mount.cifs "user=" conflict and trigger
  unexpected behavior

Status in cifs-utils package in Ubuntu:
  Invalid

Bug description:
  
  My FSTAB so far had this entry
    //10.7.0.231/documents /mnt/nas/documents cifs 
user,noauto,user=paelzer,vers=3.0 0 0

  I found after a reboot (to free up of the crashes above) that I need to 
change this.
  I wondered why the logins won't work anymore until I realized it was trying 
to authenticate root@<NAS> which is wrong.

  So far it had correctly authenticated for user=paelzer.

    //10.7.0.231/documents /mnt/nas/documents cifs
  user,noauto,username=paelzer,vers=3.0 0 0

  man mount.cifs specifies
  username=arg|user=arg
  specifies the username to connect as. If this is not given, then the 
environment variable USER is used.Earlier  versions  of  mount.cifs also 
allowed one to specify the username in a user%password or workgroup/user or 
workgroup/user%password to allow the password and workgroup to be specified as 
part of the username. Support for those alternate username formats is now 
deprecated and should no longer  be used.  Users  should  use  the discrete 
password= and domain= to specify those values. While some versions of the cifs 
kernel module accept user= as an abbreviation for this option, its use can 
confuse the standard mount program into thinking that this is a non-superuser 
mount. It is  therefore  recommended to use the full username= option name.

  But it seems for me "user=" no more works.
  There was a recent security update for samba (server side), but not CIFS 
utils.
  The only component I'd know of in this chain that has changed was the kernel 
part of it.

  I tracked this down to the following:
  I had so far:
  $ grep documents /etc/fstab 
  //10.7.0.231/documents /mnt/nas/documents cifs 
user,noauto,user=paelzer,vers=3.0 0 0

  Of these "user" is of fstab that is supposed to allow everybody to mount.
  and "user=" is for cifs to set the user.

  It turns out that "user" + "user=" is equal to only setting "user" and the 
effective login is derived from the current user id.
  So a sudo gives me root and without sudo I have my user.

  Now that is worth a not in the man page, but not more.
  I initially thought the kernel update would be involved and this be part of 
bug 1787328, but it isn't this is "normal" behavior.

  My mind still is on that other bug with the kernel crash, I think for
  this aspect here we would open a bug/proposed change to the cifs man
  page to clarify? Other suggestions?

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cifs-utils/+bug/1787353/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to