Mailinglist Archive: opensuse (1445 mails)

< Previous Next >
Re: [opensuse] how to add users non interactively?
On Sat, Mar 24, 2012 at 01:20:07AM +0100, Andreas wrote:
is there a convenient way to add a couple of user accounts in a non
interactive way?

I'd like to have a scrpipt that does something like

useradd user1 --p pass1 -G group1, group2
useradd user2 --p pass2 -G group2, group3

I'd rather have those passwords unencrypted in the batch file as I can
make sure noone will see it.

Pretty much like you write.

useradd -G group1,group2 -p pass1 user1
useradd -G group2,group3 -p pass2 user2

etc. see man useradd

Ciao, Marcus
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >