如何添加npm用户

时间:2016-05-03 06:31:02

标签: windows npm puppet

我试图在使用puppet.i得到错误的Windows上使用竹代理(user = bambooagent)和密码(****)添加用户。任何人都可以帮我在puppet exec资源中添加用户名和密码的adduser。enter code here command => $ {cmd} npm adduser --registry = http://absc.com

1 个答案:

答案 0 :(得分:1)

您可以使用user木偶资源来创建用户:

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

此处提供更多信息:https://docs.puppet.com/puppet/latest/reference/resources_user_group_windows.html#local-usergroup-resources