Re: [Samba] Change default GID of users

2013-08-29 Thread Bruno Vane
Thank you Steve,

I had this mapping in nslcd.conf
map passwd  gidNumber   primaryGroupID

I need the gidNumber to be 100 because this is gidnumber of group users
in my Ubuntu servers.
I will disable this mapping and test if everything is OK.


2013/8/28 steve st...@steve-ss.com

 On Tue, 2013-08-27 at 16:07 -0300, Bruno Vane wrote:
  Hi Steve,
 
 
  Seems that this attribute does not matter, see my user bruno.vane:
  primaryGroupID: 513
  gidNumber: 100

 Hi

 How are you obtaining the infromation from AD?
 If you set:
  gidNumber: 100
 in the DN of a user, then that is what will be returned when e.g.
 nss-ldapd is used. It will not return primaryGroupID unless you have
 mapped that attribute to gidNumber in nslcd.conf. primaryGroupID is not
 a rfc2307 atribute.
 HTH





-- 

Bruno Vane
HPM Tecnologia
(24) 9278-7195 / (24) 3345-0002
skype: broonu

www.zamix.com.br | www.superonda.com.br
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Change default GID of users

2013-08-29 Thread Marc Muehlfeld

Hello Bruno,

Am 29.08.2013 16:11, schrieb Bruno Vane:

I had this mapping in nslcd.conf
map passwd  gidNumber   primaryGroupID

I need the gidNumber to be 100 because this is gidnumber of group users
in my Ubuntu servers.
I will disable this mapping and test if everything is OK.


The mapping is not just for mapping one field to an other. You can 
replace values, too or do other things (see manpage for more).


You can hardcode the mapping:

map passwd  gidNumber  666


# getent passwd
...
Administrator:*:1:666::/home/Administrator:/bin/bash
technik:*:10001:666:Technik:/home/technik:/bin/false
demo1:*:10002:666:Demo User1:/home/demo1:/bin/sh


And all your domain accounts have primary group 666 :-)


Regards,
Marc
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Change default GID of users

2013-08-29 Thread Bruno Vane
Thank you Marc!


2013/8/29 Marc Muehlfeld sa...@marc-muehlfeld.de

 Hello Bruno,

 Am 29.08.2013 16:11, schrieb Bruno Vane:

  I had this mapping in nslcd.conf
 map passwd  gidNumber   primaryGroupID

 I need the gidNumber to be 100 because this is gidnumber of group
 users
 in my Ubuntu servers.
 I will disable this mapping and test if everything is OK.


 The mapping is not just for mapping one field to an other. You can replace
 values, too or do other things (see manpage for more).

 You can hardcode the mapping:

 map passwd  gidNumber  666


 # getent passwd
 ...
 Administrator:*:1:666::/**home/Administrator:/bin/bash
 technik:*:10001:666:Technik:/**home/technik:/bin/false
 demo1:*:10002:666:Demo User1:/home/demo1:/bin/sh


 And all your domain accounts have primary group 666 :-)


 Regards,
 Marc




-- 

Bruno Vane
HPM Tecnologia
(24) 9278-7195 / (24) 3345-0002
skype: broonu

www.zamix.com.br | www.superonda.com.br
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Change default GID of users

2013-08-28 Thread steve
On Tue, 2013-08-27 at 16:07 -0300, Bruno Vane wrote:
 Hi Steve,
 
 
 Seems that this attribute does not matter, see my user bruno.vane:
 primaryGroupID: 513
 gidNumber: 100

Hi

How are you obtaining the infromation from AD?
If you set:
 gidNumber: 100
in the DN of a user, then that is what will be returned when e.g.
nss-ldapd is used. It will not return primaryGroupID unless you have
mapped that attribute to gidNumber in nslcd.conf. primaryGroupID is not
a rfc2307 atribute.
HTH


-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Change default GID of users

2013-08-27 Thread steve
On Tue, 2013-08-27 at 12:14 -0300, Bruno Vane wrote:
 Hi all,
 
 I'm using samba4 as DC and using ssh/nslcd/pam in some machines to lookup
 ldap base in samba4 to allow access for users.
 My question is, how can I set the default GID os users to 100, to match
 the GID of groupusers in my linux machines? All users I create with ADUC
 is getting UID 513. This machines are joined in the domain.

Hi
Add the attribute:
gidNumber: 100
to the DN of Domain Users.

The easiest way to do that is to:
ldbedit --url=/user/local/samba/private/sam.ldb cn=Domain\ Users

HTH
Steve


-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Change default GID of users

2013-08-27 Thread steve
On Tue, 2013-08-27 at 14:33 -0300, Bruno Vane wrote:
 Hi Steve,
 
 
 I did what you said, and when create the user, nothing changes:


Hi
Sorry, you have to add:
gidNumber: 100
to the DN of each user too.

Make sure that you clear the nscd cache after making any change to AD.
Steve



-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Change default GID of users

2013-08-27 Thread Bruno Vane
Hi Steve,

Seems that this attribute does not matter, see my user bruno.vane:
primaryGroupID: 513
gidNumber: 100

If I try to change the value of primaryGroupID I get an error:
Using:
root@samba:~# ldbedit -e vim --url=/usr/local/samba/private/sam.ldb
samaccountname=bruno.vane

failed to modify CN=Bruno Vane,CN=Users,DC=corporativo,DC=mydomain,DC=net -
error in module samldb: Unwilling to perform (53)
root@samba:~# ldbedit -e vim --url=/usr/local/samba/private/sam.ldb
samaccountname=bruno.vane
# 0 adds  0 modifies  0 deletes


2013/8/27 steve st...@steve-ss.com

 On Tue, 2013-08-27 at 14:33 -0300, Bruno Vane wrote:
  Hi Steve,
 
 
  I did what you said, and when create the user, nothing changes:


 Hi
 Sorry, you have to add:
 gidNumber: 100
 to the DN of each user too.

 Make sure that you clear the nscd cache after making any change to AD.
 Steve






-- 

Bruno Vane
HPM Tecnologia
(24) 9278-7195 / (24) 3345-0002
skype: broonu

www.zamix.com.br | www.superonda.com.br
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba