Found it! :)
I thought in make a script more or less that way.
#!/bin/bash
#
GROUP=ADM
GUID=10000 # Domain Users
UID=10000 # get the next ID ?
for USER in $(samba-tool group listmembers $GROUP)
do
samba-tool user edit $USER -H ldap://samdom.example.com \
-U administrato --nis-domain=samdom \
--unix-home=/home/$USER \
--uid-number=${NEXTID} \
--login-shell=/sbin/nologin \
--gid-number=$GUID
done
Of course that script is very simple, but is a beginning. :)
Can you help me to make this script?
On Fri, Dec 1, 2017 at 5:03 PM, Rowland Penny via samba <
samba at lists.samba.org> wrote:
> On Fri, 1 Dec 2017 16:51:57 -0200
> Elias Pereira <empbilly at gmail.com> wrote:
>
> > Can you share with me? :)
>
> Download the latest Samba tarball and unpack it, you will find it as
> part of user.py in:
> samba-4.7.3 --> python --> samba --> netcmd
>
> Rowland
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions: https://lists.samba.org/mailman/options/samba
>
--
Elias Pereira
Correcting! :)
#!/bin/bash
#
GROUP=ADM
GUID=10000 # Domain Users
UID=10000 # get the next ID ?
for USER in $(samba-tool group listmembers $GROUP)
do
samba-tool user edit $USER --nis-domain=samdom \
--unix-home=/home/$USER \
--uid-number=${NEXTID} \
--login-shell=/sbin/nologin \
--gid-number=$GUID
done
Of course that script is very simple, but is a beginning. :)
Can you help me to make this script?
On Sat, Dec 2, 2017 at 10:05 AM, Elias Pereira <empbilly at gmail.com>
wrote:
> Found it! :)
>
> I thought in make a script more or less that way.
>
> #!/bin/bash
> #
> GROUP=ADM
> GUID=10000 # Domain Users
> UID=10000 # get the next ID ?
>
> for USER in $(samba-tool group listmembers $GROUP)
> do
> samba-tool user edit $USER -H ldap://samdom.example.com \
> -U administrato --nis-domain=samdom \
> --unix-home=/home/$USER \
> --uid-number=${NEXTID} \
> --login-shell=/sbin/nologin \
> --gid-number=$GUID
> done
>
>
> Of course that script is very simple, but is a beginning. :)
>
> Can you help me to make this script?
>
> On Fri, Dec 1, 2017 at 5:03 PM, Rowland Penny via samba <
> samba at lists.samba.org> wrote:
>
>> On Fri, 1 Dec 2017 16:51:57 -0200
>> Elias Pereira <empbilly at gmail.com> wrote:
>>
>> > Can you share with me? :)
>>
>> Download the latest Samba tarball and unpack it, you will find it as
>> part of user.py in:
>> samba-4.7.3 --> python --> samba --> netcmd
>>
>> Rowland
>>
>> --
>> To unsubscribe from this list go to the following URL and read the
>> instructions: https://lists.samba.org/mailman/options/samba
>>
>
>
>
> --
> Elias Pereira
>
--
Elias Pereira
On Sat, 2 Dec 2017 10:21:07 -0200 Elias Pereira <empbilly at gmail.com> wrote:> Correcting! :) > > #!/bin/bash > # > GROUP=ADM > GUID=10000 # Domain Users > UID=10000 # get the next ID ? > > for USER in $(samba-tool group listmembers $GROUP) > do > samba-tool user edit $USER --nis-domain=samdom \ > --unix-home=/home/$USER \ > --uid-number=${NEXTID} \ > --login-shell=/sbin/nologin \ > --gid-number=$GUID > done > > > Of course that script is very simple, but is a beginning. :) > > Can you help me to make this script? > > On Sat, Dec 2, 2017 at 10:05 AM, Elias Pereira <empbilly at gmail.com> > wrote: > > > Found it! :) > > > > I thought in make a script more or less that way. > > > > #!/bin/bash > > # > > GROUP=ADM > > GUID=10000 # Domain Users > > UID=10000 # get the next ID ? > > > > for USER in $(samba-tool group listmembers $GROUP) > > do > > samba-tool user edit $USER -H ldap://samdom.example.com \ > > -U administrato --nis-domain=samdom \ > > --unix-home=/home/$USER \ > > --uid-number=${NEXTID} \ > > --login-shell=/sbin/nologin \ > > --gid-number=$GUID > > done > > > > > > Of course that script is very simple, but is a beginning. :) > > > > Can you help me to make this script? > >Sorry, but that isn't going to work with 'samba-tool user edit' You would need to write an 'editor' script to do what you would need to do. Bit busy, just now, give me some time, I have a script somewhere that should do what you want. Rowland