# [Solved] Problem with cups and pam

## Mben

A while (several months at least) cups started refusing to let me log in using my root password (or any other). At the time the quick fix was to change the configuration so that cups wouldn't prompt for a password to do anything, but now I am trying to get network printing working and this is no longer acceptable.  I haven't been able to find anyone having a similar problem on the web, so I am hoping someone here might have some idea what is causing this. I think it has something to do with pam because of the messages in the cups error log like this one:

```

E [16/Mar/2007:19:38:53 -0400] cupsdAuthorize: pam_authenticate() returned 28 (Module is unknown)!

I [16/Mar/2007:19:38:53 -0400] commptr=""

```

```

emerge -pv cups

[ebuild   R   ] net-print/cups-1.2.8  USE="X dbus jpeg nls pam php png ppds samba ssl tiff -ldap -slp" 0 kB 

```

Otherwise, printing works fine.

I have tried remerging cups and pam as well as their plugins. Since I have a fairly old install I tried rm'ing /etc/cups and starting fresh but this didn't help. My system is up to date ~x86.

Any help is appreciated, ThanksLast edited by Mben on Fri Mar 23, 2007 12:41 am; edited 1 time in total

----------

## Mben

I eventually figured it out my self, with the help of some new Google results, so hopefully this post at least helps someone. It turns out that my /etc/pam.d/cups file was outdated. I deleted it and re-emerged cups and pam. For the record it currently reads 

```

# File autogenerated by pamd_mimic_system in pam eclass

auth    include         system-auth

account include         system-auth

```

As compared to my original containing:

```

# $Header: /var/cvsroot/gentoo-x86/net-print/cups/files/cups.pam,v 1.3 2004/07/18 04:18:17 dragonheart Exp $

auth    required        /lib/security/pam_stack.so service=system-auth

account required        /lib/security/pam_stack.so service=system-auth

```

Now my question is shouldn't portage have taken care of this? Most of the files in /etc/pam.d are several years old. I wonder if this is affecting any other packages   :Question: 

Oh well, at least its fixed   :Wink: 

----------

## wynn

When updating, emerge will only remove files which have the same timestamp as its canonical collection in /var/db/pkg/<collection>/<package>/CONTENTS (it may check the MD5 signature as well). If a file is edited or, for some reason, missed, it will never be removed.

"equery check <collection>/<package>" will tell you if there are any files like this for <package>.

----------

