Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
pam_access
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
trINItr0n_
n00b
n00b


Joined: 05 Feb 2004
Posts: 44
Location: Belgium::Leuven

PostPosted: Wed Jan 19, 2005 5:19 pm    Post subject: pam_access Reply with quote

Hi,

i think i just did something terrible:

I have this remote box and was juist tightening up security with this guide: http://www.puschitz.com/SecuringLinux.shtml
so for not allowing anyone other than the users group to login i added these to the default gentoo config:

In /etc/security/access.conf:
-:ALL EXCEPT users :ALL

and /etc/pam.d/syst-auth:
account required /lib/security/pam_access.so

Now i still can login but when su-ing i get:
su: Permission denied
Sorry.

Did not change any other files like /etc/pam.d/su or anything ..

What did i do wrong ?
and will a local-console user be able to su ? or in single user mode ?
any other ways then to go back, boot up with boot-cd and chroot everthing are welcome :)
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Wed Jan 19, 2005 5:28 pm    Post subject: Reply with quote

Boot up in single user mode:
Code:
gentoo single

and you will be logged in as root without authenticating.
_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
trINItr0n_
n00b
n00b


Joined: 05 Feb 2004
Posts: 44
Location: Belgium::Leuven

PostPosted: Fri Jan 21, 2005 10:52 am    Post subject: Reply with quote

thanks .. any idea what i did wrong though ?

or what is the gentoo-way to let only one group of users login to the system ?
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Fri Jan 21, 2005 11:01 am    Post subject: Reply with quote

Erm.. root is not a member of the users group ?

You specify an access method of ALL - meaning any way a non-users-member tries to get in is denied, including su.

Add this line (straight from the example access.conf!):

Code:
+:wheel:LOCAL

which should let you su to any wheel member.

Yes, LOCAL means from a local process, which should include su.

Of course, you could add root to the users group if you like.
But I'm fairly certain that that is not the Gentoo way...
_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
trINItr0n_
n00b
n00b


Joined: 05 Feb 2004
Posts: 44
Location: Belgium::Leuven

PostPosted: Fri Jan 21, 2005 11:42 am    Post subject: Reply with quote

it works now :)

- only users from group users can login
- only users from wheel can su

Code:
+:wheel:LOCAL
-:ALL EXCEPT users:ALL


note that the +:wheel:LOCAL has to be the first line ..

thanks noorderbuur :)
cya!
Back to top
View user's profile Send private message
trINItr0n_
n00b
n00b


Joined: 05 Feb 2004
Posts: 44
Location: Belgium::Leuven

PostPosted: Fri Jan 21, 2005 1:24 pm    Post subject: Reply with quote

but root can login directly with console (local) now .. any way to solve this proprerly with pam ? ( i know /etc/securetty) could also do this)
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Fri Jan 21, 2005 6:28 pm    Post subject: Reply with quote

Again - read the provided examples in access.conf.
Code:
-:ALL:tty*

prevents anyone from logging in on a console - ever.
_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
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