Mailinglist Archive: opensuse (1480 mails)

< Previous Next >
Re: [opensuse] how to add users non interactively?
Andreas <maps.on@xxxxxxx> wrote:

Hi,
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.
--

There must be a way to protect a password in a script, but I don't know it.

Can the script be interactive with the user and ask for the passwords? Or have
the passwords in an encrypted container and ask the user for the password
needed to extract the user passwords?

Anyway, I suggest you repost the question with a subject about protecting
passwords when working with scripts. It's a generic question that has nothing
to do with adding users.

Greg

--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups
References