Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Samba] samba-tool set default group

601 views
Skip to first unread message

steve

unread,
Feb 9, 2012, 8:30:02 AM2/9/12
to
Hi
How do I set the default group for a user?

e.g.
samba-tool group add opensuse
samba-tool group addusers opensuse steve

But steve's default group is still Users.

I'm looking for soething like this:
'samba-tool group setdefaultgroup steve opensuse'

But here isn't that command. I have to do it in Windows.

Is there a command I'm missing?
Cheers,
Steve
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba

Gémes Géza

unread,
Feb 9, 2012, 1:20:01 PM2/9/12
to
2012-02-09 14:21 keltezéssel, steve írta:
> Hi
> How do I set the default group for a user?
>
> e.g.
> samba-tool group add opensuse
> samba-tool group addusers opensuse steve
>
> But steve's default group is still Users.
>
> I'm looking for soething like this:
> 'samba-tool group setdefaultgroup steve opensuse'
>
> But here isn't that command. I have to do it in Windows.
>
> Is there a command I'm missing?
> Cheers,
> Steve
IMHO currently your best bet is ldbmodify.

Regards

Geza

steve

unread,
Feb 10, 2012, 6:10:02 AM2/10/12
to
On 02/09/2012 07:17 PM, Gémes Géza wrote:
> 2012-02-09 14:21 keltezéssel, steve írta:
>> Hi
>> How do I set the default group for a user?
>>
>> e.g.
>> samba-tool group add opensuse
>> samba-tool group addusers opensuse steve
>>
>> But steve's default group is still Users.
>>
>> I'm looking for soething like this:
>> 'samba-tool group setdefaultgroup steve opensuse'
>>
>> But here isn't that command. I have to do it in Windows.
>>
>> Is there a command I'm missing?
>> Cheers,
>> Steve
> IMHO currently your best bet is ldbmodify.
>
> Regards
>
> Geza
I tried using phpldapadmin:
http://4.bp.blogspot.com/-oeTty-Y6HFo/TzT49_mZe3I/AAAAAAAAALE/zGb00l_WMC4/s320/ldapadmin.png
Same. I can add the user to the group but I can't find where the default
group attribute or object is in ldap.

What shoud I be looking for?
Thanks,
Steve

steve

unread,
Feb 10, 2012, 6:20:02 AM2/10/12
to

Gémes Géza

unread,
Feb 10, 2012, 12:30:02 PM2/10/12
to
2012-02-10 12:11 keltezéssel, steve írta:
> On 02/10/2012 12:08 PM, steve wrote:
>> On 02/09/2012 07:17 PM, Gémes Géza wrote:
>>> 2012-02-09 14:21 keltezéssel, steve írta:
>>>> Hi How do I set the default group for a user?
>>>>
>>>> e.g. samba-tool group add opensuse samba-tool group addusers
>>>> opensuse steve
>>>>
>>>> But steve's default group is still Users.
>>>>
>>>> I'm looking for soething like this: 'samba-tool group
>>>> setdefaultgroup steve opensuse'
>>>>
>>>> But here isn't that command. I have to do it in Windows.
>>>>
>>>> Is there a command I'm missing? Cheers, Steve
>>> IMHO currently your best bet is ldbmodify.
>>>
>>> Regards
>>>
>>> Geza
>> I tried using phpldapadmin:
>>
http://4.bp.blogspot.com/-oeTty-Y6HFo/TzT49_mZe3I/AAAAAAAAALE/zGb00l_WMC4/s320/ldapadmin.png
>>
>>
Same. I can add the user to the group but I can't find where the default
group attribute or object is in ldap.
>>
>> What shoud I be looking for? Thanks, Steve
>>
> Sorry:
> http://4.bp.blogspot.com/-oeTty-Y6HFo/TzT49_mZe3I/AAAAAAAAALE/zGb00l_WMC4/s1600/ldapadmin.png
>
Hi,

You need to modify the user, not the group. The attribute you are
looking for is:
primaryGroupID

Regards

Geza

Matthieu Patou

unread,
Feb 11, 2012, 5:10:01 PM2/11/12
to
On 02/09/2012 05:21 AM, steve wrote:
> Hi
> How do I set the default group for a user?
>
> e.g.
> samba-tool group add opensuse
> samba-tool group addusers opensuse steve
>
> But steve's default group is still Users.
>
> I'm looking for soething like this:
> 'samba-tool group setdefaultgroup steve opensuse'
>
> But here isn't that command. I have to do it in Windows.
>
> Is there a command I'm missing?
> Cheers,
> Steve

Do you know that you can use the windows admin tools again samba 4 also,
Administration pack for Windows XP/2003 or Vista/2008 are working very
well against samba.

With those tool changing the default group is just a breath.

Matthieu.

--
Matthieu Patou
Samba Team
http://samba.org

steve

unread,
Feb 11, 2012, 5:50:02 PM2/11/12
to
On 02/11/2012 11:07 PM, Matthieu Patou wrote:
> On 02/09/2012 05:21 AM, steve wrote:
>> Hi
>> How do I set the default group for a user?
>>
>> e.g.
>> samba-tool group add opensuse
>> samba-tool group addusers opensuse steve
>>
>> But steve's default group is still Users.
>>
>> I'm looking for soething like this:
>> 'samba-tool group setdefaultgroup steve opensuse'
>>
>> But here isn't that command. I have to do it in Windows.
>>
>> Is there a command I'm missing?
>> Cheers,
>> Steve
>
> Do you know that you can use the windows admin tools again samba 4
> also, Administration pack for Windows XP/2003 or Vista/2008 are
> working very well against samba.
>
> With those tool changing the default group is just a breath.
>
> Matthieu.
>
Hi

Yes, but it seems overkill to have to tie up a whole Windows client when
all we need is a 3 line ldif to change primaryGroupID (Thanks to Geza
for pointing us at the correct attribute).

Having said that, are there any plans to include the (rather nice)
Resara front end for Samba4 with any official release?

Thanks for your time,
Steve

steve

unread,
Feb 13, 2012, 11:40:02 AM2/13/12
to
Hi again

Thanks for that. So, e.g. posix-ified user steve6 in group suseusers:
wbinfo --group-info=suseusers
suseusers:*:3000016:
getent group suseusers
suseusers:*:3000016:

Before:
wbinfo -i steve6
CACTUS\steve6:*:3000015:100::/home/CACTUS/steve6:/bin/false
getent passwd steve6
steve6:*:3000015:3000016:steve6:/home/CACTUS/steve6:/bin/bash
(note the 100)
After adding steve6 to suseusers, there is no primaryGroupID attribute
set. On Windows dsa.msc, I go and change the default group:

http://2.bp.blogspot.com/-oDBqT03MB78/Tzk2-FN9C6I/AAAAAAAAALU/4Ihs7VgK2Yk/s1600/s6-steve6user.png

After:
wbinfo -i steve6
CACTUS\steve6:*:3000015:3000016::/home/CACTUS/steve6:/bin/false
getent passwd steve6
steve6:*:3000015:3000016:steve6:/home/CACTUS/steve6:/bin/bash
(note the 3000016)
ldapsearch on cn=steve6 now gives me:
primaryGroupID: 1112

Question, without using windows, how can I get at the primaryGroupID:
attribute to be able to set it to 1112 for cn=steve6 via a script?

Cheers,
Steve
0 new messages