dubul
dubul

Reputation: 13

How to add npm user

I was trying to add user using bamboo agent(user= bambooagent)and password(****) on windows using puppet.i'm getting error. can anyone help me in adding adduser with username and password in puppet exec resource.enter code herecommand => ${cmd} npm adduser --registry=http://absc.com

Upvotes: 1

Views: 262

Answers (1)

RaviTezu
RaviTezu

Reputation: 3125

You can use the user puppet resource to create a user:

user {'bambooagent':
    name            => 'bambooagent',
    ensure          => present,
    comment         => 'Bamboo Agent',
    groups          => ['<group-names-separated-by-commmas>'],
    auth_membership => inclusive,
    password        => '<your-password-here>',
}

More information here: https://docs.puppet.com/puppet/latest/reference/resources_user_group_windows.html#local-usergroup-resources

Upvotes: 1

Related Questions