of the part. We can tackle this in the same
script that handles the mount problem. We devised such a script to get
pam_mount working on Red Hat Desktop. The script for the mount command we
give here (as is) as an example in Example 7 13.
Example 7 13 Script domount to handle problems with pam_mount
#!/bin/sh x
#
# Script to fix pam_mount.so not getting uid=0 rights
#
# create mountpoint if it does not exist
if [ ! d $4 ]; then
mkdir $4
chmod 777 $4
fi
#
# if mount is smbfs and user is domain user substract DOM+ from the sharename
# this assumes that the winbind separator is +
#
if [ $2 = smbfs ]; then
IFS="/"
host= echo $3 |awk {print $1}
duser= echo $3 |awk {print $2}
IFS="+"
nuser= echo $duser |awk {print $2}
if [ "$nuser" = "" ]; then
# if not domain user share than contains no + and nuser will be empty
# restore sharename from original argument 3
sharename=$3
else
# construct a sharename consisting of only username
# shares do not handly +
sharename="//$host/$nuser"
fi
IFS=" "
/usr/bin/smbmount $sharename $4 $5 $6 $7 $8 $9
else
# if not smb mount try to perform normal mount
/usr/bin/mount $1 $2 $3 $4 $5 $6 $7 $8 $9
fi
This script works with pam_mount Version 0.9.18 on Red Hat Desktop 3. The
script has to be put somewhere in the file system and should be executable and
setuid root. If the script is called /usr/local/bin/domount ,we do this by executing
the following commands:
chown root.root /usr/local/bin/domount
chown 4755 /usr/local/bin/domount
146
Linux Client Migration Cookbook A Practical Planning and Implementation Guide for Migrating to Desktop
footer
Our partners:
PHP: Hypertext Preprocessor Cheap Web Hosting
JSP Web Hosting
Ontario Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Java Hosting
Cheapest Hosting
Visionwebhosting.net Business web hosting division of Vision Web Hosting Inc.. All rights reserved