LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-30-2008, 08:20 AM   #1
zerocool22
Member
 
Registered: Feb 2008
Posts: 95

Rep: Reputation: 15
server 2003 Unix attributes


Hey, if you go to Windows 2003 Active Directory, Unix attributes tab, you have a group id. How can i use this id in linux, i already authenticate my linux server to active directory, but i dont have a clue how restrict access to members via these groups, can someone give me some info about everything they know about these "group id" things.

The reason im asking im trying to build a infrastructure/hierarchy in active directory and use it in linux, but dont know how this works.

Grtz
 
Old 04-30-2008, 08:25 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Well how are you authenticating? The simplest "nice" solution would be ldap in which case you'd configure the ldap.conf on the client machine to map those attributes to the uid and gid you need locally. most ldap.conf files do have a template section for mapping MSSFU attributes into real UNIX ones. Once you have done this then the usage of the data become generic, just that rather than adding some user to local group number 501 (for example) you'd add them to group 12345 which just so happens to be held on AD, but at that stage that's none of your concern.

Last edited by acid_kewpie; 04-30-2008 at 08:29 AM.
 
Old 04-30-2008, 08:31 AM   #3
zerocool22
Member
 
Registered: Feb 2008
Posts: 95

Original Poster
Rep: Reputation: 15
hey, yeah im using ldap for authentication, but still dont have a clue??
 
Old 04-30-2008, 08:32 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well, as above to be honest... configure openldap client, configure nsswitch and pam to use ldap. you've not said what distro you are using so i can't comment on any specifics...
 
Old 04-30-2008, 09:08 AM   #5
zerocool22
Member
 
Registered: Feb 2008
Posts: 95

Original Poster
Rep: Reputation: 15
yeah i already can authenticate(im using centos), so i add some users to active directory
200 is the admin group
100 is the normal user group
------------------------------
john group id: 200
jack group id: 100
elle group id: 100

I log them into my linux server, then what? example there is a folder /home/shares
Group 100 can read but cant change anything, and everyone from group 200 can do everything they want with the foldeR.

How do i set this up?
 
Old 04-30-2008, 09:33 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well a really good demarcation point is the getent tool. running "getent group" on the client will list all known groups from whatever sources it has configured, and that should then be listed. on AD you should use much higher numbers though, nothing below 10000 i'd say, so you know that and uid or gid greater than that is on Active Directory and nothing is going to clash.
 
Old 05-05-2008, 02:12 AM   #7
zerocool22
Member
 
Registered: Feb 2008
Posts: 95

Original Poster
Rep: Reputation: 15
Hmm dont quite get it, sorry for late reply, due to holiday. So in Active Directory i had the unix attributes shown as in the screenshot.
Click here. Only were there says Primary group name/ GID i have set it up as 666 and not as 100.
I log in with the user and do the following:
[root@localhost ~]# getent group
root:x:0:root
bin:x:1:root,bin,daemon
daemon:x:2:root,bin,daemon
sys:x:3:root,bin,adm
adm:x:4:root,adm,daemon
tty:x:5:
disk:x:6:root
lp:x:7:daemon,lp
mem:x:8:
kmem:x:9:
wheel:x:10:root
mail:x:12:mail
news:x:13:news
uucp:x:14:uucp
man:x:15:
games:x:20:
gopher:x:30:
dip:x:40:
ftp:x:50:
lock:x:54:
nobody:x:99:
users:x:100:
dbus:x:81:
floppy:x:19:
vcsa:x:69:
rpm:x:37:
haldaemon:x:68:
utmp:x:22:
netdump:x:34:
nscd:x:28:
slocate:x:21:
sshd:x:74:
rpc:x:32:
mailnull:x:47:
smmsp:x:51:
rpcuser:x:29:
nfsnobody:x:65534:
pcap:x:77:
apache:x:48:
squid:x:23:
webalizer:x:67:
ntp:x:38:
hpsmh:x:500:

And my group 666 is not shown here, why? Do i have to create a simular group in linux first, if so how do i do this?
 
Old 05-05-2008, 03:19 AM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
the groups shown are only shown if a full legitimate entry is available when the mappings in /etc/ldap.conf are applied to the AD ldap results. Also the resources queried here are the ones specified in /etc/nsswitch.conf, as often configured under redhat based systems using system-config-authentication, or configured manually by hand. so have you got the right entires in both ldap.conf and nsswitch.conf? are you happily already using a tool like ldapsearch to query the ldap services on AD?
 
Old 05-05-2008, 03:21 AM   #9
zerocool22
Member
 
Registered: Feb 2008
Posts: 95

Original Poster
Rep: Reputation: 15
i did everything the same, as in the following link:
http://adminspotting.net/articles/wi...Directory.html
 
Old 05-05-2008, 04:20 AM   #10
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Well I asked a number of questions you didn't answer... So at what stage do things not work? are you doing ldap searches ok? i've not seen lubnss-ldap.conf, all ldap stuff i do is generally in /etc/ldap.conf so maybe you've created config files that your system isn't reading.
 
Old 05-05-2008, 04:25 AM   #11
zerocool22
Member
 
Registered: Feb 2008
Posts: 95

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by acid_kewpie View Post
Well I asked a number of questions you didn't answer... So at what stage do things not work? are you doing ldap searches ok? i've not seen lubnss-ldap.conf, all ldap stuff i do is generally in /etc/ldap.conf so maybe you've created config files that your system isn't reading.
oh sorry, well i use ldapsearch to look up users and such and thats works fine, i can logon to linux server with ssh with active directory credentials,if i do getent users, i get list of active directory users, indeed my config file is also in /etc/ldap.conf cause the tutorial is one for debian, i use a RHEL based distribution(centos).

The thing that doesnt work is i added a new user in active directory, i set in unix attributes, the primary group id to 666 then i try to to getent group in linux, but there isnt any group shown as 666?

Last edited by zerocool22; 05-05-2008 at 04:27 AM.
 
Old 05-06-2008, 05:30 AM   #12
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
So it would still be presumed that the attributes are not being fully mapped. You might like to try to cut the problem in half and use a tool like wireshark to see what is being sent on the wire... are you actually receiving the ldap results that are subsequently being dropped?
 
Old 05-06-2008, 05:56 AM   #13
zerocool22
Member
 
Registered: Feb 2008
Posts: 95

Original Poster
Rep: Reputation: 15
hey thx, but i can use ldapsearch perfectly, i can login just fin with active directory, i dont think this is a wire problem, cause all firewals are downn, and i also have it running in a test environment, and thats just virtual machines on Vmware running on my pc. Cause getent passwd does show all active directory users also..
So i think the problem just lies in that i dont know how to add the users in a group and use that group for building hiearchy.
 
Old 05-06-2008, 06:15 AM   #14
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
yes, but you have a seperate mapping for groups to passwd entries, so you still need to ensure for each form of data as defined in nsswitch.conf that you are pulling across valid data. if you do see valid data on the getent command (not just a generic ldapsearch) then the mapping between the two really must be wrong still in /etc/ldap.conf
 
Old 05-06-2008, 06:42 AM   #15
zerocool22
Member
 
Registered: Feb 2008
Posts: 95

Original Poster
Rep: Reputation: 15
oh ok thx,

this is my ldap.conf
----------------------
host server.example.com
base dc=example,dc=com
ldap_version 3
binddn cn=scout,cn=Users,dc=example,dc=com
bindpw correctpasswordusedhere
scope sub
timelimit 30
nss_map_objectclass posixAccount user
nss_map_objectclass shadowAccount user
nss_map_attribute homeDirectory unixHomeDirectory

my nsswitch.conf
-----------------

/etc/nsswitch.conf

passwd: ldap files
shadow: ldap files
group: ldap files
hosts: files dns
bootparams: nisplus [NOTFOUND=return] files
ethers: files
netmasks: files
networks: files
protocols: files
rpc: files
services: files
netgroup: nisplus
publickey: nisplus
automount: files nisplus
aliases: files nisplus
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Server 2003 and Services for Unix 3.5.... grim*nix General 1 07-14-2007 08:21 AM
Changing file attributes automatically on update to a server madtinkerer Programming 3 11-16-2006 06:13 PM
Bad homedirectory attributes when mounting from SFU NFS Server OgeeN Linux - Software 0 07-31-2006 05:41 AM
unix file attributes - windows exploder k1mgy Linux - Networking 1 01-13-2005 02:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration