[rhn-users] Mass Usernames and Directories

Mark Maggelet mark at educationplanet.com
Fri Aug 4 18:02:12 UTC 2006


how about: (from inside the dir with names)

for i in `/bin/ls -1`
do
   useradd -p genericpwd $i
   chown $i $i
done


Bill Watson wrote:
> The way I did this was to create a text file with:
> useradd -g users -m -p -d direct4me xxxxx99 mugwhump
> useradd -g users -m -p -d directory2 xxxxx99 otheruser
> useradd -g users -m -p xxxxx99 another
>  
> The first 2 with the -d option create the specific directory for the 
> user, the 3rd one uses the default /home/another
>  
> Then from the root command line prompt:
> # sh ./textfile-that-I-created
>  
> Bill Watson
> bill at magicdigits.com <mailto:bill at magicdigits.com>
> 
>     -----Original Message-----
>     *From:* rhn-users-bounces at redhat.com
>     [mailto:rhn-users-bounces at redhat.com] *On Behalf Of *Vincent Matyi
>     *Sent:* Friday, August 04, 2006 10:27 AM
>     *To:* Red Hat Network Users List
>     *Subject:* [rhn-users] Mass Usernames and Directories
> 
>     Hi
> 
>     I have a massive directory of users that I've migrated to a new install.
> 
>     I will have to create a new user, one by one, and point them back to
>     their directory. And, them ownership and passwords.
> 
>     My question to this list is their a way to speed this up? 
> 
>     Potentially a command that will create usernames based on each name
>     of the containing directory, one generic password, and ownership to
>     the directory.
> 
>     Thanks for any feedback,
>     Vincent
> 
> 
>     On Aug 4, 2006, at 1:10 PM, Ted Marshall wrote:
> 
>     At least in FC3 and later, under Gnome, I use
>     "Desktop->Preferences->Removable Drives and Media".  I assume that
>     this works on RHEL 4 also.
> 
>>     Date: Thu, 3 Aug 2006 15:53:20 -0700
>>     From: "Brad SHARPE" <bsharpe at mdacorporation.com
>>     <mailto:bsharpe at mdacorporation.com>>
>>     Subject: [rhn-users] Disabling USB drive automounts
>>     To: <rhn-users at redhat.com <mailto:rhn-users at redhat.com>>
>>     Message-ID:
>>     <57F67688A8D72449AC80164DA9820831730809 at VMXYVR1.ds.mda.ca
>>     <mailto:57F67688A8D72449AC80164DA9820831730809 at VMXYVR1.ds.mda.ca>>
>>     Content-Type: text/plain; charset="us-ascii"
>>
>>     Hi,
>>
>>     Has anyone had experience disabling the automount system in RHEL 4. I
>>     would like to turn off automounting of any USB/FIREWIRE drives
>>     attached
>>     to the machine. The key is that I can't turn the USB ports off because
>>     I'm using USB mice and keyboards.
>>
>>     Thanks for the help.
>>     Brad
> 
> 
> 
>     _______________________________________________
>     rhn-users mailing list
>     rhn-users at redhat.com <mailto:rhn-users at redhat.com>
>     https://www.redhat.com/mailman/listinfo/rhn-users
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> rhn-users mailing list
> rhn-users at redhat.com
> https://www.redhat.com/mailman/listinfo/rhn-users




More information about the rhn-users mailing list