Fwd: script

Patrick Asselman iceblink at seti.nl
Mon Sep 2 14:57:54 UTC 2013


On 2013-08-30 09:03, jiten jha wrote:
>  On Fri, Aug 30, 2013 at 12:12 PM, Gene Heskett <gheskett at wdtv.com> 
> wrote:
>> On Friday 30 August 2013 02:34:08 jiten jha did opine:
>>
>> > Dear Friends,
>> >
>> > I want to add 100 users in my ubuntu server I have a scrip but 
>> when i
>> > run script it is adding user but asking password. So can you check 
>> my
>> > scrip and modify it so that when I run it . It will not  ask 
>> password .
>> >
>> > I want same username and same password.
>> > Like :
>> >  username = jiten
>> > password = jiten
>>
>> I looked at your script, but the whole concept seems flawed to me.
>>
>> In any *nix, usernames and passwords s/b unique, and this seems 
>> doomed to
>> fail as it would appear to just recreate the same user 100 times and 
>> you
>> would wind up with only 1 actual user, if it could but I don't think 
>> it can
>> without reporting an already exists error for the last 99.
>>
>> Perhaps someone could offer constructive advice if we knew why you 
>> needed
>> 100 users all named alike, with identical passwords.
>>
>> Cheers, Gene
>> --
>> "There are four boxes to be used in defense of liberty:
>>  soap, ballot, jury, and ammo. Please use in that order."
>> -Ed Howdershelt (Author)
>> My web page: <http://coyoteden.dyndns-free.com:85/gene [1]> is up!
>> My views
>> <http://www.armchairpatriot.com/What%20Has%20America%20Become.shtml 
>> [2]>
>> Positively no smoking.
>> A pen in the hand of this president is far more
>> dangerous than 200 million guns in the hands of
>>          law-abiding citizens.
>>
>> --
>> ubuntu-users mailing list
>> ubuntu-users at lists.ubuntu.com
>> Modify settings or unsubscribe at: 
>> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users [3]
>
> Hello ,
>
> I want 100 users with different name like users = a , b ,c ,d and the
> password of user 'a' is a and user 'b' is b.
>

I fully agree with previous posters who have indicated that it is very 
unsafe to use a certain easily deductable password scheme for multiple 
users.

There are many examples available online, such as this one:
http://jacobkiers.net/2008/12/23/automatically-add-user-to-ubuntu-linux-and-set-password/

(You will need to install the mkpasswd package, in a terminal type  
"sudo apt-get update; sudo apt-get install mkpasswd").

The key thing seems to be to use "useradd" instead of "adduser".

If you really must use the username for password I'm sure you can 
figure out how to change the script ;)

Best regards,
Patrick





More information about the ubuntu-users mailing list