LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-01-2010, 11:18 PM   #1
politik
Member
 
Registered: Jun 2005
Location: Chicago
Distribution: Ubuntu 12.04 Precise Pangolin
Posts: 48

Rep: Reputation: 15
troubleshooting pam_mount with logs


Hello all,

I am trying to use pam_mount to auto mount some shares on an XP box and I am trying to figure out which log pam_mount writes to.

I've checked /var/logs/

daemon.log
debug.log
messages.log
syslog

and searching for "pam_mount" yields no results.

searching for "pam_mount" in auth.log gives some results but nothing too verbose.....only things like "mount failed" with no additional info.

Is there some other log I'm missing that pam_mount would be writing to ? Didn't see any other logs in /var/logs that look like pam_mount logs.

I've seen other people posting about troubleshooting pam_mount and their logs seem to have way more info that what I found in auth.log.

There is a setting in the pam_mount config file to enable debugging and I have it enabled.

Any ideas ?

Thanks.
 
Old 07-02-2010, 02:33 AM   #2
subho.d
Member
 
Registered: Jun 2010
Location: INDIA
Distribution: All Linux & Unix
Posts: 86

Rep: Reputation: 19
configure samba and then mount that 4m win system...
 
Old 07-02-2010, 04:00 AM   #3
politik
Member
 
Registered: Jun 2005
Location: Chicago
Distribution: Ubuntu 12.04 Precise Pangolin
Posts: 48

Original Poster
Rep: Reputation: 15
Thanks for the reply.

I'll restate my question in more of a general manner to narrow things down:

I'm trying to troubleshoot an application that doesn't appear to write anything to syslog. I've enabled the debug option in the config file for this application, which is supposed to enable verbose output to syslog. But I still don't see any information for this application in syslog.

The app does write some info to /var/log/auth.log but this info isn't as verbose as what's supposed to be in syslog and it isn't enough info to troubleshoot properly.

Are there any newbie "gotchas" any one can think of that may be preventing my app from writing to syslog ?

When I look at the logs I do "gksudo gedit" to make sure I'm looking at the logs as superuser, and I reload the logs every time gedit prompts me to.

Is there something else I'm missing ?

Thanks.
 
Old 07-02-2010, 04:22 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,332
Blog Entries: 55

Rep: Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533
Quote:
Originally Posted by politik View Post
I'm trying to troubleshoot an application that doesn't appear to write anything to syslog. I've enabled the debug option in the config file for this application, which is supposed to enable verbose output to syslog. But I still don't see any information for this application in syslog.
Can you be more specific and provide application details, posting version nfo and configuration details if deemed necessary?


Quote:
Originally Posted by politik View Post
searching for "pam_mount" in auth.log gives some results but nothing too verbose.....only things like "mount failed" with no additional info. (..) There is a setting in the pam_mount config file to enable debugging and I have it enabled.
Could you post your /etc/pam.d PAM stack in which you use pam_mount? And your /etc/security/pam_mount.conf.xml and ~/.pam_mount.conf.xml? Not sure if it helps but the more nfo the better.
 
Old 07-02-2010, 02:23 PM   #5
politik
Member
 
Registered: Jun 2005
Location: Chicago
Distribution: Ubuntu 12.04 Precise Pangolin
Posts: 48

Original Poster
Rep: Reputation: 15
Hello unSpawn, thanks for the reply.

I was trying to keep it high level and ruleout any newbie gotchas about why pam_mount doesn't seem to be writing anything to syslog. I was hoping that once I got pam_mount to write more verbose info to the logs, there would be more info for me to go on, and then I would continue troubleshooting via the "Software" forum.

I don't have access to the machine in question right now, but I will post up the requested specifics as soon as I get a chance.

Thanks again for the reply :-)
 
Old 07-03-2010, 11:01 AM   #6
politik
Member
 
Registered: Jun 2005
Location: Chicago
Distribution: Ubuntu 12.04 Precise Pangolin
Posts: 48

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by unSpawn View Post
Can you be more specific and provide application details, posting version nfo and configuration details if deemed necessary?
I am using libpam-mount 1.32-2 to try and automatically mount shares on an XP machine at login, and automatically unmount the same XP shares at log out.

I have two groups on the Xubuntu machine:

xpsharesreadonly: if the user logging in is a member of this group, mount xpshare 1 and xpshare 2 as read only

xpsharesreadwrt: if the user logging in is a member of this group, mount xpshare 1, xpshare2, and xpshare3 as read write.



Quote:
Originally Posted by unSpawn View Post
Could you post your /etc/pam.d PAM stack in which you use pam_mount?
Don't know what you mean by "post the etc/pam.d PAM stack" ? Should I be posting the contents of specific files ?


Quote:
Originally Posted by unSpawn View Post
And your /etc/security/pam_mount.conf.xml and ~/.pam_mount.conf.xml? Not sure if it helps but the more nfo the better.
I chose not to allow per-user mounts, so there are no ~/.pam_mount.conf.xml files.

Here is etc/security/pam_mount.conf.xml:

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE pam_mount SYSTEM "pam_mount.conf.xml.dtd">
<!--
See pam_mount.conf(5) for a description.
-->

<pam_mount>

<!-- debug should come before everything else,
since this file is still processed in a single pass
from top-to-bottom -->

<debug enable="1" />


<!-- Volume definitions -->

<!-- if you are a member of the group "xpsharesreadonly", then mount the XP share "share1" as read only -->


<volume options="user,ro,credentials=~/.smbcredentials"
fstype="cifs"
server="servername"
path="share1"
mountpoint="~/Music/servername_share1"
>

<sgrp>xpsharesreadonly</sgrp>

</volume>

<!-- pam_mount parameters: General tunables -->

<!--
<luserconf name=".pam_mount.conf.xml" />
-->

<!-- Note that commenting out mntoptions will give you the defaults.
You will need to explicitly initialize it with the empty string
to reset the defaults to nothing. -->
<mntoptions allow="nosuid,nodev,loop,encryption,fsck,nonempty,allow_root,allow_other" />
<!--
<mntoptions deny="suid,dev" />
<mntoptions allow="*" />
<mntoptions deny="*" />
-->
<mntoptions require="nosuid,nodev" />
<path>/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin</path>

<logout wait="0" hup="0" term="0" kill="0" />


<!-- pam_mount parameters: Volume-related -->

<mkmountpoint enable="1" remove="true" />


</pam_mount>


I have the debug option set to 1 with this line:

<debug enable="1" />

which is supposed to enable logging to syslog but no pam_mount info is showing up in syslog.

I also indicated to automatically create the mount point at login, and delete the mount point at log out:

<mkmountpoint enable="1" remove="true" />

and when a user in group "xpsharesreadonly" logs in, the mount point is created (but the mount point is not deleted at log out), so it seems like pam_mount is actually working and processing the pam_mount.conf.xml file.

Thanks again for the help and let me know if there is any additional info you need.

Last edited by politik; 07-03-2010 at 11:10 AM.
 
Old 07-03-2010, 11:12 AM   #7
politik
Member
 
Registered: Jun 2005
Location: Chicago
Distribution: Ubuntu 12.04 Precise Pangolin
Posts: 48

Original Poster
Rep: Reputation: 15
Additional note: I only have logic for the group xpsharesreadonly in my pam_mount.conf.xml file right now. Once I get that working, I'll add logic for the group xpsharesreadwrt.
 
Old 07-03-2010, 11:28 AM   #8
politik
Member
 
Registered: Jun 2005
Location: Chicago
Distribution: Ubuntu 12.04 Precise Pangolin
Posts: 48

Original Poster
Rep: Reputation: 15
update: pam_mount is automatically creating the mount point at log in *and* automatically deleting the mount point at log off. So looks like pam_mout is at least installed correctly and processing the pam_mount.conf.xml file, but the share on the xp box still isn't mounting.
 
Old 07-05-2010, 05:24 PM   #9
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,332
Blog Entries: 55

Rep: Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533
Since pam_mount works then if debug is still enabled please check the logs for anything related. If that doesn't show any problems and if the CLI cifsmount command works for the user who is logging in then if there isn't anything logged then I don't know, sorry.
 
Old 07-05-2010, 08:03 PM   #10
politik
Member
 
Registered: Jun 2005
Location: Chicago
Distribution: Ubuntu 12.04 Precise Pangolin
Posts: 48

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by unSpawn View Post
Since pam_mount works
pam_mount is automatically creating/deleting the mount point but the xp shares are not being mounted, so I wouldn't say pam_mount is "working"

I can mount the xp shares flawlessly from the command line, so I'm pretty sure it's not an issue with permissions or anything on the xp side. I am trying to use pam_mount to automate the mount process.

Quote:
Originally Posted by unSpawn View Post
then if debug is still enabled please check the logs for anything related.
That was my original dilemma that I posted about before. As stated previously, I have logging enabled but nothing from pam_mount is being written to syslog. The only log that has any pam_mount related info is /var/logs/auth.log
 
  


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
PAM_Mount johnson8707 Linux - Software 2 03-04-2009 08:30 AM
pam_mount does not work iinfi Linux - Desktop 2 02-15-2009 01:11 PM
Help with Gutsy pam_mount pccdrussell Linux - Software 1 09-17-2008 02:07 PM
Iptables (with masq) troubleshooting, very simple script attached script and logs. xinu Linux - Networking 13 11-01-2007 05:19 AM
Troubleshooting the Network Analyser Logs???? ajeetraina Linux - Server 0 09-04-2007 01:03 AM


All times are GMT -5. The time now is 10:39 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration