Greetings,
On 8/3/09, David Leon wrote:
> Hello guys
>
> I have a new Centos 5.3 running, and I have a text file with a bunch
> of accounts (more than 100) that I should create
> .
> File format is like this
>
> user1 pasword1
> user2 passwrd2
>
>
> How can I do this task easier than creatin
thanks, I will try this, it looks like what I'm looking for
On 8/3/09, a arias wrote:
> Try this:
>
> while true
> do
>read username passwd
>if [ "$username" == "" ]
>then
>exit
>fi
> passwd_hash=$(openssl passwd $passwd)
> echo "Using the
I found this
This command is intended to be used in a large system environment
where many accounts are updated at a single time (batch mode). Since
username and passwords are stored in clear text format make sure only
root can read/write the file.
Use chmod command:
# touch /root/batch-user-add.
Try this:
while true
do
read username passwd
if [ "$username" == "" ]
then
exit
fi
passwd_hash=$(openssl passwd $passwd)
echo "Using the following password hash for user "$username":
$passwd_hash"
/usr/sbin/useradd $username -p "$passwd_hash";
David Leon wrote:
> I'm trying to avoid typing every password manually. I just need an
> script that makes the job.
>
> useradd creates the account but still need to setup accpunt's password.
>
from 'man passwd'
--stdin
This option is used to indicate that passwd should read
Hi,
On Mon, Aug 3, 2009 at 14:49, David Leon wrote:
> I'm trying to avoid typing every password manually. I just need an
> script that makes the job.
echo "$password" | passwd --stdin "$username"
Obviously, this must be run as root.
HTH,
Filipe
___
Ce
Use expect/autoexpect + apg tool.
Thank you.
On 03/08/09 21:49, David Leon wrote:
I'm trying to avoid typing every password manually. I just need an
script that makes the job.
useradd creates the account but still need to setup accpunt's password.
On 8/3/09, nate wrote:
David Leon wrote
I'm trying to avoid typing every password manually. I just need an
script that makes the job.
useradd creates the account but still need to setup accpunt's password.
On 8/3/09, nate wrote:
> David Leon wrote:
>> Hello guys
>>
>> I have a new Centos 5.3 running, and I have a text file with a bu
On Mon, Aug 3, 2009 at 3:04 PM, David Leon wrote:
> Hello guys
>
> I have a new Centos 5.3 running, and I have a text file with a bunch
> of accounts (more than 100) that I should create
> .
> File format is like this
>
> user1 pasword1
> user2 passwrd2
>
>
> How can I do this task easier than
David Leon wrote:
> Hello guys
>
> I have a new Centos 5.3 running, and I have a text file with a bunch
> of accounts (more than 100) that I should create
What's the question? How to do it? Parse the text file and use
something like useradd to add the accounts, is probably the quickest
way.
nate
Hello guys
I have a new Centos 5.3 running, and I have a text file with a bunch
of accounts (more than 100) that I should create
.
File format is like this
user1 pasword1
user2 passwrd2
How can I do this task easier than creating user one by one by hand?
Need some help for building an scrip
11 matches
Mail list logo