autofs set $USER to "root" instead of current user

Bug #1626749 reported by Nicolas
46
This bug affects 8 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Incomplete
Medium
Unassigned

Bug Description

Since last kernel upgrade from 4.4.0-36 to 4.4.0-38 automount failed to mount remote smb FS.
The configuration file use $USER, $UID and $GID variables :
i.e. :
music -fstype=cifs,credentials=/home/$USER/.creds-file,user=$USER,uid=$UID,gid=$GID ://192.168.1.9/music

When a user account try to mount the FS, automount complain :

 >> error 2 (No such file or directory) opening credential file /home/root/.creds-file

$USER, $UID and $GID are now sets with root variables instead of user account variables

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: autofs 5.1.1-1ubuntu3
ProcVersionSignature: Ubuntu 4.4.0-38.57-generic 4.4.19
Uname: Linux 4.4.0-38-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
Date: Thu Sep 22 23:17:27 2016
ExecutablePath: /usr/sbin/automount
InstallationDate: Installed on 2016-02-07 (228 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Release amd64 (20151021)
ProcEnviron:
 PATH=(custom, no user)
 LANG=fr_FR.UTF-8
SourcePackage: autofs
UpgradeStatus: Upgraded to xenial on 2016-04-28 (147 days ago)
---
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: nicolas 1941 F.... pulseaudio
DistroRelease: Ubuntu 16.04
HibernationDevice: RESUME=UUID=1ad9a17c-8b27-4436-a024-6c9ae99a5b87
InstallationDate: Installed on 2016-02-07 (228 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Release amd64 (20151021)
MachineType: Sony Corporation SVS1511R9ES
Package: linux (not installed)
ProcEnviron:
 LANGUAGE=fr_FR
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-4.4.0-38-generic.efi.signed root=UUID=df815dd3-2e1b-42d3-aef8-1823eb5d4f75 ro quiet splash vt.handoff=7
ProcVersionSignature: Ubuntu 4.4.0-38.57-generic 4.4.19
PulseList: Error: command ['pacmd', 'list'] failed with exit code 1: No PulseAudio daemon running, or not running as session daemon.
RelatedPackageVersions:
 linux-restricted-modules-4.4.0-38-generic N/A
 linux-backports-modules-4.4.0-38-generic N/A
 linux-firmware 1.157.3
Tags: xenial
Uname: Linux 4.4.0-38-generic x86_64
UpgradeStatus: Upgraded to xenial on 2016-04-28 (147 days ago)
UserGroups:

_MarkForUpload: True
dmi.bios.date: 03/30/2012
dmi.bios.vendor: Insyde Corp.
dmi.bios.version: R0140C5
dmi.board.asset.tag: N/A
dmi.board.name: VAIO
dmi.board.vendor: Sony Corporation
dmi.board.version: N/A
dmi.chassis.asset.tag: N/A
dmi.chassis.type: 10
dmi.chassis.vendor: Sony Corporation
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnInsydeCorp.:bvrR0140C5:bd03/30/2012:svnSonyCorporation:pnSVS1511R9ES:pvrC60AGQAL:rvnSonyCorporation:rnVAIO:rvrN/A:cvnSonyCorporation:ct10:cvrN/A:
dmi.product.name: SVS1511R9ES
dmi.product.version: C60AGQAL
dmi.sys.vendor: Sony Corporation

Revision history for this message
Nicolas (2trucmuche) wrote :
Revision history for this message
Robie Basak (racb) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

Since you say this was due to a change in the kernel version, it sounds like is a kernel regression rather than a bug in the autofs package, so reassigning.

affects: autofs (Ubuntu) → linux (Ubuntu)
tags: added: regression-update
Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1626749

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
kalyp (kalyp) wrote :

I am affected by this bug as well and tried to run the apport-collect command, but while it does opens a new browser window it only is a blank one with no option to authorize the program.

Revision history for this message
Nicolas (2trucmuche) wrote : AlsaInfo.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
Nicolas (2trucmuche) wrote : CRDA.txt

apport information

Revision history for this message
Nicolas (2trucmuche) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Nicolas (2trucmuche) wrote : IwConfig.txt

apport information

Revision history for this message
Nicolas (2trucmuche) wrote : JournalErrors.txt

apport information

Revision history for this message
Nicolas (2trucmuche) wrote : Lspci.txt

apport information

Revision history for this message
Nicolas (2trucmuche) wrote : Lsusb.txt

apport information

Revision history for this message
Nicolas (2trucmuche) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Nicolas (2trucmuche) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Nicolas (2trucmuche) wrote : ProcModules.txt

apport information

Revision history for this message
Nicolas (2trucmuche) wrote : RfKill.txt

apport information

Revision history for this message
Nicolas (2trucmuche) wrote : UdevDb.txt

apport information

Revision history for this message
Nicolas (2trucmuche) wrote : WifiSyslog.txt

apport information

Revision history for this message
Nicolas (2trucmuche) wrote :
Download full text (3.5 KiB)

I post the logfile generate in the syslog by automount in debug mode

Sep 23 19:43:28 nroc-linux automount[25168]: handle_packet: type = 3
Sep 23 19:43:28 nroc-linux automount[25168]: handle_packet_missing_indirect: token 307, name video, request pid 12909
Sep 23 19:43:28 nroc-linux automount[25168]: attempting to mount entry /home/nicolas/NASNRO/video
Sep 23 19:43:28 nroc-linux automount[25168]: lookup_mount: lookup(file): looking up video
Sep 23 19:43:28 nroc-linux automount[25168]: lookup_mount: lookup(file): video -> -fstype=cifs,credentials=/home/$USER/.creds-file,user=$USER,uid=$UID,gid=$GID ://192.168.1.9/video
Sep 23 19:43:28 nroc-linux automount[25168]: parse_mount: parse(sun): expanded entry: -fstype=cifs,credentials=/home/root/.creds-file,user=root,uid=0,gid=0 ://192.168.1.9/video
Sep 23 19:43:28 nroc-linux automount[25168]: parse_mount: parse(sun): gathered options: fstype=cifs,credentials=/home/root/.creds-file,user=root,uid=0,gid=0
Sep 23 19:43:28 nroc-linux automount[25168]: parse_mount: parse(sun): dequote("://192.168.1.9/video") -> ://192.168.1.9/video
Sep 23 19:43:28 nroc-linux automount[25168]: parse_mount: parse(sun): core of entry: options=fstype=cifs,credentials=/home/root/.creds-file,user=root,uid=0,gid=0, loc=://192.168.1.9/video
Sep 23 19:43:28 nroc-linux automount[25168]: sun_mount: parse(sun): mounting root /home/nicolas/NASNRO, mountpoint video, what //192.168.1.9/video, fstype cifs, options credentials=/home/root/.creds-file,user=root,uid=0,gid=0
Sep 23 19:43:28 nroc-linux automount[25168]: do_mount: //192.168.1.9/video /home/nicolas/NASNRO/video type cifs options credentials=/home/root/.creds-file,user=root,uid=0,gid=0 using module generic
Sep 23 19:43:28 nroc-linux automount[25168]: mount_mount: mount(generic): calling mkdir_path /home/nicolas/NASNRO/video
Sep 23 19:43:28 nroc-linux automount[25168]: mount_mount: mount(generic): calling mount -t cifs -o credentials=/home/root/.creds-file,user=root,uid=0,gid=0 //192.168.1.9/video /home/nicolas/NASNRO/video
Sep 23 19:43:28 nroc-linux automount[25168]: >> error 2 (No such file or directory) opening credential file /home/root/.creds-file
Sep 23 19:43:28 nroc-linux automount[25168]: mount(generic): failed to mount //192.168.1.9/video (type cifs) on /home/nicolas/NASNRO/video
Sep 23 19:43:28 nroc-linux automount[25168]: dev_ioctl_send_fail: token = 307
Sep 23 19:43:28 nroc-linux automount[25168]: failed to mount /home/nicolas/NASNRO/video
Sep 23 19:43:28 nroc-linux automount[25168]: handle_packet: type = 3
Sep 23 19:43:28 nroc-linux automount[25168]: handle_packet_missing_indirect: token 308, name video, request pid 12909
Sep 23 19:43:28 nroc-linux automount[25168]: dev_ioctl_send_fail: token = 308
Sep 23 19:43:28 nroc-linux automount[25168]: st_expire: state 1 path /home/nicolas/NASNRO
Sep 23 19:43:28 nroc-linux automount[25168]: expire_proc: exp_proc = 139912387811072 path /home/nicolas/NASNRO
Sep 23 19:43:28 nroc-linux automount[25168]: expire_cleanup: got thid 139912387811072 path /home/nicolas/NASNRO stat 0
Sep 23 19:43:28 nroc-linux automount[25168]: expire_cleanup: sigchld: exp 139912387811072 finished, switching from 2 to 1
Sep 23 19:43:28 nroc-linux automoun...

Read more...

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Changed in linux (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Seth Forshee (sforshee) wrote :

@Nicolas: Can you try kernel version 4.4.0-40.60 from -proposed? There's a fix in there that may address your issue. You can download the linux-image-4.4.0-40-generic and linux-image-extra-4.4.0-40-generic packages from the following link. Thanks!

https://launchpad.net/~canonical-kernel-team/+archive/ubuntu/ppa/+build/10948005

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Fabio (fabio1299) wrote :

I had the same problem after doing a "do-release-upgrade" from 14.04 to 16.04 on October 5, 2016.
The kernel installed by default was 4.4.0-38.

After reading this thread I installed 4.4.0-40.60.
With both 4.4.0-38 and 4.4.0-40.60 I have the problem of $USER being mapped to root instead of to the current user.

I then installed kernel 4.4.0-36 (which I'm using on other VMs that were upgraded a few weeks back) and everything worked just fine.

Revision history for this message
Gerald Lovel (glovel) wrote : Re: [Bug 1626749] Re: autofs set $USER to "root" instead of current user
Download full text (4.7 KiB)

The upgrade from 4.4.0-36 to 4.4.0-38 is what broke autofs and sshfs. I
posted this bug because it was not listed as a security issue. Since this
bug forces a switch from certificates to password authentication, it should
be considered as a security problem and the severity should be escalated.
Apparently Ubuntu staff do not agree.

Gerald
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Gerald Lovel | 901.276.1004
<email address hidden> | AAltSys.com
AAltSys Technology Center
<http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=aaltsys&aq=&sll=37.0625,-95.677068&sspn=52.947994,100.898438&ie=UTF8&hq=aaltsys&hnear=&z=13&iwloc=A&cid=7533665924136652323>

On Wed, Oct 5, 2016 at 7:24 PM, Fabio <email address hidden> wrote:

> I had the same problem after doing a "do-release-upgrade" from 14.04 to
> 16.04 on October 5, 2016.
> The kernel installed by default was 4.4.0-38.
>
> After reading this thread I installed 4.4.0-40.60.
> With both 4.4.0-38 and 4.4.0-40.60 I have the problem of $USER being
> mapped to root instead of to the current user.
>
> I then installed kernel 4.4.0-36 (which I'm using on other VMs that were
> upgraded a few weeks back) and everything worked just fine.
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (1628586).
> https://bugs.launchpad.net/bugs/1626749
>
> Title:
> autofs set $USER to "root" instead of current user
>
> Status in linux package in Ubuntu:
> Incomplete
>
> Bug description:
> Since last kernel upgrade from 4.4.0-36 to 4.4.0-38 automount failed to
> mount remote smb FS.
> The configuration file use $USER, $UID and $GID variables :
> i.e. :
> music -fstype=cifs,credentials=/home/$USER/.creds-file,user=$USER,uid=$UID,gid=$GID
> ://192.168.1.9/music
>
> When a user account try to mount the FS, automount complain :
>
> >> error 2 (No such file or directory) opening credential file
> /home/root/.creds-file
>
> $USER, $UID and $GID are now sets with root variables instead of user
> account variables
>
> ProblemType: Bug
> DistroRelease: Ubuntu 16.04
> Package: autofs 5.1.1-1ubuntu3
> ProcVersionSignature: Ubuntu 4.4.0-38.57-generic 4.4.19
> Uname: Linux 4.4.0-38-generic x86_64
> ApportVersion: 2.20.1-0ubuntu2.1
> Architecture: amd64
> Date: Thu Sep 22 23:17:27 2016
> ExecutablePath: /usr/sbin/automount
> InstallationDate: Installed on 2016-02-07 (228 days ago)
> InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Release amd64
> (20151021)
> ProcEnviron:
> PATH=(custom, no user)
> LANG=fr_FR.UTF-8
> SourcePackage: autofs
> UpgradeStatus: Upgraded to xenial on 2016-04-28 (147 days ago)
> ---
> ApportVersion: 2.20.1-0ubuntu2.1
> Architecture: amd64
> AudioDevicesInUse:
> USER PID ACCESS COMMAND
> /dev/snd/controlC0: nicolas 1941 F.... pulseaudio
> DistroRelease: Ubuntu 16.04
> HibernationDevice: RESUME=UUID=1ad9a17c-8b27-4436-a024-6c9ae99a5b87
> InstallationDate: Installed on 2016-02-07 (228 days ago)
> InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Release amd64
> (20151021)
> MachineType: Sony Corporation SVS1511R9ES
> Package: linux (not installed)
> ProcEnviron:
> LANGUAG...

Read more...

Revision history for this message
kalyp (kalyp) wrote :

The bug is still occurring with kernel 4.4.0-43, as a FYI.

Revision history for this message
Fabio (fabio1299) wrote :

FYI ...and also with kernel 4.4.0-45.

Revision history for this message
muzzol (muzzol) wrote :

I just hit this bug and it's really a stopper for me.

I'll downgrade kernel until is resolved.

Revision history for this message
Nicolas (2trucmuche) wrote :

Hello
4.4.0-47 solved it for me.

thks
Regards

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.