[Bug 570944] Re: passwd : gives "Authentication token manipulation error"

urusha 570944 at bugs.launchpad.net
Mon Sep 12 13:29:50 UTC 2011


Here is my solution:
1) copy "winbind" "winbind-noauthtok" "unix-noauthtok" files from attachments to /usr/share/pam-configs/ (with overwrite)
2) copy "pam_winbind.conf" from attachment to /etc/security/
3) run pam-auth-update and check "Unix authentication (no use_authtok)" & "Winbind NT/Active Directory authentication (no use_authtok)", also uncheck "Unix authentication" & "Winbind NT/Active Directory authentication"
4) use it

What it is:
1) new configs.
  1. winbind - is the same as default winbind (you need to overwrite it) but:
    a) without krb5_*, cached_login options, I think these should be placed in special config file /etc/security/pam_winbind.conf - this is much more customizable way to configure pam_winbind without any involving of pam-auth-update. Also this solves bug about not getting krb ticket and ccache when changing expired password on login (pam_winbind passwd section should contain krb5_* options too, but it doesn't)
    b) increased "Priority", it's to solve buggy changing expired password on login. Winbind should be before unix (like pam_krb5 does)
  2. winbind-noauthtok, unix-noauthtok - is the same as winbind and unix, but without use_authtok option. These configs conflicts with winbind, unix and cracklib, so you can't install winbind-noauthtok with winbind or cracklib
2) see 1-1-a
3) just changing configs in /etc/pam.d/ "the right" way
4) this solution has the next advantages:
  1. customizable - you may choose: use cracklib or not, pam-auth-update suggests different ways
  2. solves some existing bugs: allows you to change unix, wb password via passwd command (or any other graphical tools); allows to change expired unix, wb password on login; gets krb ticket and ccache after wb expired password has been changed; maybe some others...

To packages supporters:
  Why not to implement this in all pam modules packages (add unix, unix-noauthtok in libpam-runtime for example), while thinking about upgrading whole pam system?
  It would be really nice to add function of detecting if use use_authtok or not to pam-auth-update (just read configs of higher priority modules).

Some offtopic (to pam-auth-update supporters):
  Even if I use pam_winbind.conf option "mkhomedir = yes" it doesn't copy skel directory to new user home. So I'm forced to use pam_mkhomedir. But if I create config for it in /usr/share/pam-configs, it adds lines about making home derictories to /etc/pam.d/common-session-noninteractive too, and this is really BAD behavior. So the right way is to implement "Session-noninteractive:" section in config files, I think.

Thanks for attantion.

** Attachment added: "winbind"
   https://bugs.launchpad.net/ubuntu/+source/samba/+bug/570944/+attachment/2391119/+files/winbind

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to samba in Ubuntu.
https://bugs.launchpad.net/bugs/570944

Title:
  passwd : gives "Authentication token manipulation error"

Status in “samba” package in Ubuntu:
  Triaged

Bug description:
  Binary package hint: samba

   `passwd` for ActiveDirectory account gives "Authentication token
  manipulation error"

  I have latest and greatest of LucidLynx updates.

      winbind    2:3.4.7~dfsg-1ubuntu3 
      samba     2:3.4.7~dfsg-1ubuntu3

  I have ActiveDirectory integration with Samba/Winbind. (not Likewise-Open)
  Logging into Console window or `ssh`-ing into machine works fine using
  DOMAIN\first.last account names.

  Trying to change password with the `passwd` program:

  $ passwd
  Changing password for DOMAIN\first.last
  (current) NT password:
  passwd: Authentication token manipulation error
  passwd: password unchanged
  $

  In the /var/log/auth.log file I get this output in conjunction with
  the above passwd attempt:

  pam_unix(passwd:chauthtok): user "DOMAIN\first.last" does not exist in /etc/passwd
  passwd[16109]: pam_winbind(passwd:chauthtok): getting password (0x0000002a)

  passwd[16109]: pam_winbind(passwd:chauthtok): user 'DOMAIN\first.last' granted access
  passwd[16109]: pam_unix(passwd:chauthtok): user "DOMAIN\first.last" does not exist in /etc/passwd
  passwd[16109]: pam_winbind(passwd:chauthtok): getting password (0x00000012)

  I don't see anything particularly wrong with that output, other
  than it seems to stop prematurely.

  This is my default-created /etc/pam.d/common-password file:

  password [success=2 default=ignore] pam_unix.so obscure sha512
  password [success=1 default=ignore] pam_winbind.so use_authtok try_first_pass
  password requisite pam_deny.so
  password required pam_permit.so
  password optional pam_gnome_keyring.so

  I've Googled for "Authentication token manipulation error", but most
  cases involve local Linux accounts or other uninteresting problems.

  I don't think any entries in smb.conf have an effect on passwd, but
  here's a snippet of entries with the word "pass" or "encrypt" in them:

  password server = machine.domain.com
  encrypt passwords = true
  passdb backend = tdbsam
  unix password sync = yes
  passwd program = /usr/bin/passwd %u
  passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
  pam password change = yes
  encrypt passwords = true

  
  I can successfully change password, using `passwd` for a local Linux account.

  $ passwd
  Changing password for localAccount.
  (current) UNIX password:
  Enter new UNIX password:
  Retype new UNIX password:
  passwd: password updated successfully
  $

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/samba/+bug/570944/+subscriptions




More information about the foundations-bugs mailing list