[K12OSN] adding users to fuse group

rmcdaniel at indata.us rmcdaniel at indata.us
Fri Apr 7 20:30:39 UTC 2006


Sorry,  This is the correct script.  I had left a Delete command in the
script.  Please don't do the same thing.  You won't be happy with the
results:(


for THIS in `awk -F: '$4 ~ /\<100\>/ { print $1 }' /etc/passwd`
do
/usr/bin/gpasswd -a $THIS fuse
done


Just substitute the group number that you want to work with for "100"
above.



Ron



Ronald R. McDaniel
Conecuh County Schools
(251) 578-7073 x26
(251) 238-1890 cell
1*4238*104 SouthernLinc
rmcdaniel at indata.us


> -------- Original Message --------
> Subject: RE: [K12OSN] adding users to fuse group
> From: rmcdaniel at indata.us
> Date: Fri, April 07, 2006 3:21 pm
> To: "Support list for opensource software in schools."
> <k12osn at redhat.com>
> 
> This works good. I tested it on my group # 502 which is STUDENT.  Just
> substitute the group number in the first line.
> 
> for THIS in `awk -F: '$4 ~ /\<502\>/ { print $1 }' /etc/passwd`
> do
> /usr/bin/gpasswd -a $THIS fuse
> userdel -r $THIS
> done
> 
> 
> Ron
> 
> 
> 
> Ronald R. McDaniel
> Conecuh County Schools
> (251) 578-7073 x26
> (251) 238-1890 cell
> 1*4238*104 SouthernLinc
> rmcdaniel at indata.us
> 
> 
> > -------- Original Message --------
> > Subject: RE: [K12OSN] adding users to fuse group
> > From: rmcdaniel at indata.us
> > Date: Fri, April 07, 2006 2:29 pm
> > To: "Support list for opensource software in schools."
> > <k12osn at redhat.com>
> > 
> > I am testing the script without any luck yet.  The command is the right
> > one, however my logic or script format isn't right.
> > 
> > ROn
> > Ronald R. McDaniel
> > Conecuh County Schools
> > (251) 578-7073 x26
> > (251) 238-1890 cell
> > 1*4238*104 SouthernLinc
> > rmcdaniel at indata.us
> > 
> > 
> > > -------- Original Message --------
> > > Subject: RE: [K12OSN] adding users to fuse group
> > > From: rmcdaniel at indata.us
> > > Date: Fri, April 07, 2006 2:09 pm
> > > To: "Support list for opensource software in schools."
> > > <k12osn at redhat.com>
> > > 
> > > Maybe something like this:
> > > 
> > > NORMALUSERSTART=500
> > > numentries=${#user_id[@]}
> > > for (( index=0; index<numentries; index++ )); do
> > >     if (( ${user_id[index]#*:} >= $NORMALUSERSTART )) ; 
> > >     then /usr/bin/gpasswd -a ${user_id[index]%*:} groupname
> > > fi
> > > done
> > > 
> > > 
> > > 
> > > I haven't tried this, don't forget to substitute in the groupname.  It
> > > starts at 500 so that it doesn't modify things like root, etc.
> > > 
> > > 
> > > 
> > > Ron
> > > 
> > > 
> > > Ronald R. McDaniel
> > > Conecuh County Schools
> > > (251) 578-7073 x26
> > > (251) 238-1890 cell
> > > 1*4238*104 SouthernLinc
> > > rmcdaniel at indata.us
> > > 
> > > 
> > > > -------- Original Message --------
> > > > Subject: [K12OSN] adding users to fuse group
> > > > From: rmcdaniel at indata.us
> > > > Date: Fri, April 07, 2006 1:54 pm
> > > > To: k12osn at redhat.com
> > > > 
> > > > Here is the command.  Just add it in a script that goes through all of
> > > > the users.
> > > > 
> > > > 
> > > > The /usr/bin/gpasswd -a (loginname)  (groupname) command will add a user
> > > > (loginname) to a group.
> > > > 
> > > > 
> > > > Ron
> > > > 
> > > > Ronald R. McDaniel
> > > > Conecuh County Schools
> > > > (251) 578-7073 x26
> > > > (251) 238-1890 cell
> > > > 1*4238*104 SouthernLinc
> > > > rmcdaniel at indata.us
> > > > 
> > > > 
> > > > _______________________________________________
> > > > K12OSN mailing list
> > > > K12OSN at redhat.com
> > > > https://www.redhat.com/mailman/listinfo/k12osn
> > > > For more info see <http://www.k12os.org>
> > > 
> > > _______________________________________________
> > > K12OSN mailing list
> > > K12OSN at redhat.com
> > > https://www.redhat.com/mailman/listinfo/k12osn
> > > For more info see <http://www.k12os.org>
> > 
> > _______________________________________________
> > K12OSN mailing list
> > K12OSN at redhat.com
> > https://www.redhat.com/mailman/listinfo/k12osn
> > For more info see <http://www.k12os.org>
> 
> _______________________________________________
> K12OSN mailing list
> K12OSN at redhat.com
> https://www.redhat.com/mailman/listinfo/k12osn
> For more info see <http://www.k12os.org>




More information about the K12OSN mailing list