Closed kimptoc closed 11 years ago
Looks like you're using an old version of sprinkle. The latest should always call add user with --gecos ,,, which avoids all the prompts.
Using 0.5.2 - will give the github/head version a go.
Could do with an extra space... :)
my package line is:
add_user 'kimptoc', :flags => "--ingroup sudo --disabled-password"
But get error:
ssh: adduser --ingroup sudo --disabled-password--gecos ,,, kimptoc
stderr said -->
Unknown option: disabled-password--gecos
stdout said-->
adduser [--home DIR] [--shell SHELL] [--no-create-home] [--uid ID]
[--firstuid ID] [--lastuid ID] [--gecos GECOS] [--ingroup GROUP | --gid ID]
[--disabled-password] [--disabled-login] [--encrypt-home] USER
Add a normal user
In 0.5.2, I was doing the following to get parameters/options passed into a package, like this:
requires :add_user, :username => 'kimptoc', :sudo => true
and then in my add_user package, I did this:
add_user opts[:username], :flags => "--ingroup sudo --disabled-password"
But this does not work in 0.6 - is there a suggested way of doing this in 0.6?
Many Thanks, Chris
The latter should still work just fine. If not please open another issue for it with further details and full example code. The logic that makes that work hasn't changed much that I recall between 0.5 and 0.6.
I've added a space to the flags and will pus 0.6.1 soon.
Thank you.
Hi,
Maybe I am not passing the correct options, but when I add a user, it seems to stall on the user input bit, eg asking for Full Name.
package:
The run below hangs, until I pressed CTRL-C, which gave the stack trace shown.
error: