View previous topic :: View next topic |
Author |
Message |
trINItr0n_ n00b
Joined: 05 Feb 2004 Posts: 44 Location: Belgium::Leuven
|
Posted: Wed Jan 19, 2005 5:19 pm Post subject: pam_access |
|
|
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 |
|
|
adaptr Watchman
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Wed Jan 19, 2005 5:28 pm Post subject: |
|
|
Boot up in single user mode:
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 |
|
|
trINItr0n_ n00b
Joined: 05 Feb 2004 Posts: 44 Location: Belgium::Leuven
|
Posted: Fri Jan 21, 2005 10:52 am Post subject: |
|
|
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 |
|
|
adaptr Watchman
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Fri Jan 21, 2005 11:01 am Post subject: |
|
|
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!):
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 |
|
|
trINItr0n_ n00b
Joined: 05 Feb 2004 Posts: 44 Location: Belgium::Leuven
|
Posted: Fri Jan 21, 2005 11:42 am Post subject: |
|
|
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 |
|
|
trINItr0n_ n00b
Joined: 05 Feb 2004 Posts: 44 Location: Belgium::Leuven
|
Posted: Fri Jan 21, 2005 1:24 pm Post subject: |
|
|
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 |
|
|
adaptr Watchman
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Fri Jan 21, 2005 6:28 pm Post subject: |
|
|
Again - read the provided examples in access.conf.
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 |
|
|
|