Quantcast
Channel: linuxadmin: Expanding Linux SysAdmin knowledge
Viewing all articles
Browse latest Browse all 17759

Is there any way to allow non-admin users to mount network shares without using fstab?

$
0
0

Hi guys. I'm trying to write a script that mounts users' Active Directory home drives and I'm having some trouble. We're running RHEL 5 and we don't use Gnome/KDE or any sort of desktop environment. We do use centrifydc to authenticate users to Active Directory. The script basically does the following:

determine the path of the user's AD share

$homedir = ldapsearch sAMAccountName=user | grep homeDirectory | sed to format the result properly;

attempt to mount the share

smbmount $homedir home/user/adhome -o sec=krb5i

The ldap search works fine but mount.cifs says 'permission denied: no match for /home/user/adhome found in /etc/fstab'. I know I could specify each user's home drive in fstab but we have a large number of users and I'd rather not do this manually. Have any of you run into this before?

submitted by nsdhanoa
[link] [10 comments]

Viewing all articles
Browse latest Browse all 17759

Trending Articles