Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Deny certain users access to a host [Solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Sedrik
l33t
l33t


Joined: 08 Apr 2005
Posts: 655
Location: Uppsala, Sweden

PostPosted: Fri Jul 21, 2006 5:43 am    Post subject: Deny certain users access to a host [Solved] Reply with quote

Hi all

I'm playing around with OpenLDAP and it is working quite nice =) Now I have a request that I have not been able to find a good answer to yet. I want to be able to deny certain users access to certain hosts (or allow access to certain users). How can I do this?

I was looking at different ACL rules inside of the LDAP directory but no luck there so far. Now I was thinking if I could use the host.deny/allow files to be able to do this. I was thinking something like, if user_is_member_of_certain_group then allow access else deny

Could someone assist me in setting this up? other suggestions is welcommed to. =)


Last edited by Sedrik on Sun Jul 23, 2006 8:40 am; edited 1 time in total
Back to top
View user's profile Send private message
firesox
Tux's lil' helper
Tux's lil' helper


Joined: 24 Nov 2005
Posts: 132

PostPosted: Fri Jul 21, 2006 10:41 am    Post subject: Reply with quote

Try the file /etc/security/access.conf.
Back to top
View user's profile Send private message
dontremember
Apprentice
Apprentice


Joined: 21 Sep 2002
Posts: 151
Location: Oklahoma

PostPosted: Fri Jul 21, 2006 11:18 am    Post subject: Reply with quote

Don't do what this joker in Data Security did where I work. He wanted to stop certain userids from logging in on a system and got as far as reading about /etc/nologin: "If this file exists, people can't login". So, he loaded up /etc/nologin with the list of names, then logged out to test it...

I got this panicked phone call from his boss: "Um, we've screwed up this production system and now nobody can login. Can you fix it??"

The box was headless, which made it tricky to login on the console. Luckily this before they shutdown the rexec port and I was able to remove the offending file. The manager said, "I don't even want to know how you did that..."
Back to top
View user's profile Send private message
Sedrik
l33t
l33t


Joined: 08 Apr 2005
Posts: 655
Location: Uppsala, Sweden

PostPosted: Fri Jul 21, 2006 11:57 am    Post subject: Reply with quote

firesox wrote:
Try the file /etc/security/access.conf.


Ok will have a look at it, thanks :)

dontremember wrote:
Don't do what this joker in Data Security did where I work. He wanted to stop certain userids from logging in on a system and got as far as reading about /etc/nologin: "If this file exists, people can't login". So, he loaded up /etc/nologin with the list of names, then logged out to test it...

I got this panicked phone call from his boss: "Um, we've screwed up this production system and now nobody can login. Can you fix it??"

The box was headless, which made it tricky to login on the console. Luckily this before they shutdown the rexec port and I was able to remove the offending file. The manager said, "I don't even want to know how you did that..."


Haha, smart guy ^^ wouldn't a live cd had helped to? or did they not want to turn it off?
Back to top
View user's profile Send private message
dontremember
Apprentice
Apprentice


Joined: 21 Sep 2002
Posts: 151
Location: Oklahoma

PostPosted: Fri Jul 21, 2006 12:11 pm    Post subject: Reply with quote

Sedrik wrote:
Haha, smart guy ^^ wouldn't a live cd had helped to? or did they not want to turn it off?


Well, on most Unix systems part of the boot sequence removes the /etc/nologin file, if it exists. In Gentoo, that's handled by /etc/init.d/rmnologin.

The system in question was a production financial system, middle of the week, during month-end closing, if I recall correctly. All kinds of people would have been seriously irritated if it had to be booted the hard way - by cycling the power.
Back to top
View user's profile Send private message
Sedrik
l33t
l33t


Joined: 08 Apr 2005
Posts: 655
Location: Uppsala, Sweden

PostPosted: Sun Jul 23, 2006 8:40 am    Post subject: Reply with quote

dontremember wrote:
Sedrik wrote:
Haha, smart guy ^^ wouldn't a live cd had helped to? or did they not want to turn it off?


Well, on most Unix systems part of the boot sequence removes the /etc/nologin file, if it exists. In Gentoo, that's handled by /etc/init.d/rmnologin.

The system in question was a production financial system, middle of the week, during month-end closing, if I recall correctly. All kinds of people would have been seriously irritated if it had to be booted the hard way - by cycling the power.


Ok good that you were able to log on then =)


Btw, access.conf works great :D Users can now be denied access depending on which group I place them under in my LDAP directory. Lovley :D
Back to top
View user's profile Send private message
dontremember
Apprentice
Apprentice


Joined: 21 Sep 2002
Posts: 151
Location: Oklahoma

PostPosted: Sun Jul 23, 2006 3:01 pm    Post subject: Reply with quote

Sedrik wrote:

Ok good that you were able to log on then =)


You can send commands through the rexec port. It requires a userid and password, but doesn't check the /etc/nologin file... It allows root access too, at least Solaris 5.6 did back then.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum