[Samba] USRMGR.EXE won't add user

Karel Kulhavý clock at twibright.com
Fri Dec 12 08:25:08 GMT 2003


> >   _____________________________________________________________________________
> >  /
> > |     /usr/local/samba/bin/mygroupadd
> >  \_____________________________________________________________________________
> >  /
> > | #!/bin/bash
> > |
> > | # Add the group using normal system groupadd tool.
> > | groupadd smbtmpgrp00
> > |
> > | thegid=`cat /etc/group | grep smbtmpgrp00 | cut -d ":" -f3`
> > |
> > | # Now change the name to what we want for the MS Windows networking end
> > | cp /etc/group /etc/group.bak
> > | cat /etc/group.bak | sed -e "s/smbtmpgrp00/$1/g" > /etc/group
> > |
> > | # Now return the GID as would normally happen.
> > | echo $thegid
> > | exit 0
> > |
> >  \_____________________________________________________________________________
> >
> >
> > --
> > To unsubscribe from this list go to the following URL and read the
> > instructions:  http://lists.samba.org/mailman/listinfo/samba
> >
> 
> I hope I'm not imposing, but I was reading your post. I'm setting up my
> own Domain using Samba 3.0. My Domain was running to my satisfaction using
> 2.27a. I have since upgraded to 3.0, have been having some problems.

Did USRMGR.EXE administration work in 2.27a?

> that is "mygroupdel". I was wondering if you could post it.

I noticed I haven't written up any mygroupdel. But now I tried
/usr/sbin/groupdel and it works even for strange group names like
"Live Beef"

sh-2.05b# /usr/local/samba/bin/mygroupadd "Live Beef"
414
bash-2.05b# fgrep "Live Beef" /etc/group
Live Beef:x:414:
bash-2.05b# /usr/sbin/groupdel "Live Beef"
bash-2.05b# fgrep "Live Beef" /etc/group
bash-2.05b# 

So I changed my smb.conf line to
delete group script = /usr/sbin/groupdel "%g"

Is it possible my problems were caused by not-working group deletion?
I doubt USRMGR.EXE would delete any groups on user addition.

Cl<


More information about the samba mailing list