Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7535995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T06:27:12+00:00 2026-05-30T06:27:12+00:00

What PAM call do I have to make to reset a user’s password? I

  • 0

What PAM call do I have to make to reset a user’s password? I cannot figure it out.

Background:

I’m working on an embedded linux device. Customers install this device, and create user accounts. If one of those secondary user accounts gets locked out, or if a user forgets their password, we need a way where user #1 can reset the password for user #2. Our conversion to PAM is new, I’m in the middle of switching over to it now. Here are the calls I make to authenticate users:

pam_start();
pam_authenticate();
pam_acct_mgmt();
pam_end();

I see pam_chauthtok() for changing my own password, what I don’t understand is if — or how? — I can use it or another similar call to assign a new password to another user account.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T06:27:13+00:00Added an answer on May 30, 2026 at 6:27 am

    The whole point of having separate users is that they cannot do things like change each other’s password. In order to change a user’s password with PAM, you need to become that user. The easiest way to do this is to have a setuid-root binary, or a daemon that runs as root, which calls setuid, etc. to become the desired user then performs the operations to change password.

    Of course this exposes your entire system to a great deal of risk, especially if you’re not already skilled in these matters (which is clear from your question), so I’d think twice about whether this feature is necessary, and if so, whether you should hire an expert to handle it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Are there any working packages to change a linux user passwords using PHP? I've
I have the following table: Table: UserName Userid User UserUpdate 1 Dan 1/1/2005 1
Given a username and password, I need to check if there's a user on
Is it possible to have a PAM module that checks to see if a
I have an array of names: var names = ['john', 'ted', 'pam']; in the
I have several of these in my code which have been working fine so
First part: call F# from F# Let's say we have the following type defined
I'm interested in writing a PAM module that would make use of a popular
I've a debian system, when a user try to login, a pam module exec
We have LDAP 5.2 running so that it checks your password against a dictionary

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.