LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 11-03-2008, 01:41 PM   #1
crisostomo_enrico
Member
 
Registered: Dec 2005
Location: Madrid
Distribution: Solaris 10, Solaris Express Community Edition
Posts: 547

Rep: Reputation: 36
A problem with the Primary Administrator role and pfexec when homes are NFS mounted


Hi all.

I've got I minor problem I cannot resolve. It's not a big issue, but it's a pain every time I pfexec a shell.

The situation is: I've got a box where auto_home mounts home directory from a server via NFS. When I pfexec <some-shell> I've got this warning:
Code:
-bash-3.00$ pfexec bash
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
bash: /home/enrico/.bashrc: Permission denied
I know why this is produced (root cannot access my NFS mounted home directory and this is good) but this message it's a pain because the only solution I have is cd / and then work as usual.

What would you do in this scenario?
 
Old 11-04-2008, 02:56 AM   #2
stuart_cherrington
Member
 
Registered: Aug 2008
Location: Get back in your Cube Unix Boy!
Distribution: rh5, oel5, debian etch, solaris
Posts: 228

Rep: Reputation: 36
Well you could cheat! Copy the pfexec to pfexec.orig, and create a new pfexec, which cd's to / and then runs pfexec.orig

Its a hack, but it should work.

Stu.
 
Old 11-04-2008, 07:59 AM   #3
crisostomo_enrico
Member
 
Registered: Dec 2005
Location: Madrid
Distribution: Solaris 10, Solaris Express Community Edition
Posts: 547

Original Poster
Rep: Reputation: 36
Thanks stuart_cherrington, I suppose it could work.

The main reason I asked is because I think that's pretty common having homes mounted this way, and the trend is switching to RBAC rather than suing to root, which works correctly in this case. I was wondering how other administrators solve this issue.
 
Old 11-05-2008, 03:38 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
I do not reproduce what you observe. Does it happens with ksh too ?
 
Old 11-05-2008, 04:17 AM   #5
crisostomo_enrico
Member
 
Registered: Dec 2005
Location: Madrid
Distribution: Solaris 10, Solaris Express Community Edition
Posts: 547

Original Poster
Rep: Reputation: 36
Code:
I do not reproduce what you observe. Does it happens with ksh too ?
Thanks jlliagre, it didn't observe it immediately because I do use ksh, while the administrator I'm speaking about is a bash-addict.

I indeed observe the problem with ksh but not as soon as I pfexec it, so I think it isn't really a problem with ksh. If I make an ls it tells me that cannot access . (which is /home/theuseriam), which I believe its correct because the home directories are NFS mounted and their permission is 700, so root should be mapped to nobody and should not be able to access it. Correct?

ADDED: I understand that bash is executing getcwd because it's looking for its initialization script. The real problem with bash is that I cannot execute anything until I go out of the unreadable directory (that's why I cd /), while ksh is much lenient. If I try to cd /anotherdir with bash, the same error is displayed, while with cd / it doesn't happen. I recognize it's weird.

Last edited by crisostomo_enrico; 11-05-2008 at 04:22 AM.
 
Old 11-05-2008, 06:21 AM   #6
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
I'm able to run commands and to change to non root directories while running either bash or ksh.
I thought the privileged subshell wasn't launched but in fact it is so these are only warning messages that correctly report access issues.

You might want to truss the shell to see why it fails in your case.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba and NFS homes on other server Neruocomp Linux - Networking 0 07-11-2006 12:37 PM
Samba [homes] dir problem mmowchenko Linux - General 1 11-03-2005 10:04 PM
NFS: a mounted to b, b mounted to c, c can't read a? Steve Cronje Linux - Networking 9 10-25-2004 09:51 AM
NFS Input/Output error after filesystem mounted problem wahhh Linux - Networking 1 09-06-2004 07:48 PM
KDE suffers with homes in a nfs directory Clemente Mandriva 2 12-23-2003 02:13 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 10:01 PM.

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