RexOps / RexOps/Rex

account() command should have an option to set a password initially

Open
#551 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ready
Dominant language
Perl
Stars
737
Forks
214
PR merge metrics
No merged PRs in 30d

Description

Sometimes we just want to create accounts with an initial password and the user must change this password after first login. This can be currently done with this workaround:

task "setup_account", sub {
   my %user_info   = get_user('foouser');
   my %additional_options = ();
   if(! defined $user_info{name}) {
      $additional_options{password} = 'Test!1';
   }

   account "foouser",
    home => "/home/foouser",
    shell => "/bin/bash",
    %additional_options;
};

It would be nice to have an option that can do this.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the account() command implementation and its existing password-related option handling. Trace how account options are applied, then determine how an initial password and mandatory change after first login should be represented. Done means the new option creates the account with the supplied initial password and enforces the first-login change.

Written by the indexing model from the issue text.

Assessment

Tech stack
perl
Domain
devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.