LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-28-2011, 01:10 PM   #1
arizonagroovejet
Senior Member
 
Registered: Jun 2005
Location: England
Distribution: openSUSE, Fedora, CentOS
Posts: 1,094

Rep: Reputation: 198Reputation: 198
pam common- files


I want to run some scripts from in the pam stack using pam_exec. I've got it all set up and working by adding suitable entries in to /etc/pam.d/common-auth and /etc/pam.d/common-session. However in both those files there are comments which read

Code:
# This file is autogenerated by pam-config. All changes
# will be overwritten.
This makes me concerned that what I've added to the files might get lost.
I had a look at pam-config and found it only works for supported modules. For no reason that I've been able to determine, pam_exec is not one of those modules despite it being included in the pam package.

Anyone know how I can put a pam_exec call in to common- files in a way which means that pam-config won't wipe it out should it be run for whatever reason?

I'm using SLED but it's the same deal with openSUSE.
 
Old 07-29-2011, 01:11 AM   #2
A.Thyssen
Member
 
Registered: May 2006
Location: Brisbane, Australia
Distribution: linux
Posts: 158

Rep: Reputation: 44
It is very safe to put things into those config files and many places do this.
We so this for our University Lab based machines so as to provide logins to students, and have their remote data sub-directory (shared with other window lab machines) automatically mounted (while we have a copy of their password to do so).


The pam-config stuff is very very rarely run, and generally only done once when the machine is first configured, or a major OS upgrade is performed. In OpenSUSE, as long as you don't get it to re-configure login methods (LDAP, Active Directory, Kerberios, etc) it should never do that re-configuration.

Just keep a backup copy of the original (before your changes) and another of your current changes, just in case accidents happen. The pam-config will probably also make extra backups when it runs as well, but I would not trust it to keep its backup if it gets run twice by some novice system administrator.



The KEY to this type of change is... documentation... and logging of changes made to the system so that if you want to figure out what you (or others) have done, or want to re-build the system from scratch, you have the information to do so.

All users who have ever re-installed a computer (and even people that don't) should have as a minimum a log of the changes they made to the OS. It makes life a lot easier 3 years later when you are installing the next OS! Every computer should have a log of exactly how that computer was set up (if not why)!
 
1 members found this post helpful.
Old 07-29-2011, 08:01 AM   #3
arizonagroovejet
Senior Member
 
Registered: Jun 2005
Location: England
Distribution: openSUSE, Fedora, CentOS
Posts: 1,094

Original Poster
Rep: Reputation: 198Reputation: 198
Quote:
Originally Posted by A.Thyssen View Post
We so this for our University Lab based machines so as to provide logins to students, and have their remote data sub-directory (shared with other window lab machines) automatically mounted (while we have a copy of their password to do so).
I'm using it for much the same thing.

Quote:
Originally Posted by A.Thyssen View Post
The pam-config stuff is very very rarely run, and generally only done once when the machine is first configured, or a major OS upgrade is performed. In OpenSUSE, as long as you don't get it to re-configure login methods (LDAP, Active Directory, Kerberios, etc) it should never do that re-configuration.
Sounds good.
I had a feeling that was the case but couldn't find any documentation on the circumstances under which pam-config gets run.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Lost in common-passwd PAM configuration (Ubuntu 10.04) luvshines Linux - Newbie 1 09-07-2010 03:24 PM
How to change a common name in files? Drigo Linux - Newbie 3 10-29-2009 09:07 PM
Multiple Distro's, common files osbert Linux - General 1 07-27-2009 01:19 PM
RHEL4 Upgrade 3 /etc/pam.d/common-account needed? newbie_ned Red Hat 4 11-13-2006 02:16 PM
Common use of NFS, SAMBA, NIS, LDAP, PAM eve Linux - Networking 4 12-12-2005 08:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:16 AM.

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