Sponsored Content
Top Forums Shell Programming and Scripting NFS Mount 16+ group Issue in AIX Post 302792141 by pinnacle on Tuesday 9th of April 2013 06:36:47 PM
Old 04-09-2013
NFS Mount 16+ group Issue in AIX

Hi,
I am trying to read files from NFS mount. The ID with which I am trying to read is part of 16+ groups.

This is causing problem in doing change directory to the NFS mount directory.

I was able to get some code which does newgrp to change the default group so that I could change directories into NFS mount.
But as per the man pages of "newgrp". Looks like newgrp command invokes new shell everytime when it is called.
I am calling newgrp command as part of my korn shell. I would like to know, if calling it will impact my rest of the shell.
Looks like I could handle this issue by using here document.
But not sure if this is the right way. I have read other documentation to handle this NFS mount 16+ group situation but nothing seems to be helpful in my case (and not easy to understand documentation)
Help is appreciated.


Code:
 
/usr/bin/newgrp group1 << newgrp1
echo "Changing directory to /nfsmount/abc" 
cd /nfs/abc
 
/usr/bin/newgrp group2
cd /nfs/abc/def
 
cp /nfs/abc/def/test.txt /landingarea/app
if [ $? -eq 0 ];
then
   echo "copy successfull"
else
   echo "copy failed
fi
newgrp1

 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

NFS Mount Os400 to AIX

I am having an issue in one of my LPARs gettin a NFS mount between it, AIX and an Iseres LPAR, Os400. I get NFS Server xxxx not responding still trying. When I run the df commmand it says NFS Server xxxxx ok. Then shows the fs and then continiously puts out the about not responding error and the... (0 Replies)
Discussion started by: capeme
0 Replies

2. AIX

How to do a NFS mount from AIX to Linux?

How to do? Thanks (1 Reply)
Discussion started by: rainbow_bean
1 Replies

3. AIX

can not mount from aix client to linux nfs server

Hi, I am trying to mount a nfs folder from AIX client to Linux NFS Server, but I got the following error: # mount 128.127.11.121:/aix /to_be_del mount: 1831-010 server 128.127.11.121 not responding: RPC: 1832-018 Port mapper failure - RPC: 1832-008 Timed out mount: retrying... (1 Reply)
Discussion started by: victorcheung
1 Replies

4. AIX

NFS mount problems on AIX

Hi, I have two machines (AIX) each on a different VLAN. Need to mount a filesystem using nfs on the other one. When I export the nfs file system its a breeze. But when I try to mount it on the other machine the smitty command hangs on "running" and i get an OK from smitty but with this... (6 Replies)
Discussion started by: aixromeo
6 Replies

5. Shell Programming and Scripting

Issue with changing the permissions on an nfs mount

Hi All, I have an nfs share which I mounted to my linux machine as below. df -k output TSDapp-na-02:/vol/tsd_app_1/rn_jira 47185920 11663072 35522848 25% /opt/rn_jira I have no entry for this in my /etc/fstab. I did it by the following way. mount -t nfs... (2 Replies)
Discussion started by: Tuxidow
2 Replies

6. AIX

HACMP, NFS cross-mount problem. Can not move resource group

Hi, I'm new to HACMP. Currently I setup a cluster with nfs cross-mount follow this guide: kristijan.org NFS cross-mounts in PowerHA/HACMPMy cluster has two nodes: erp01 and erp02. I'm using nfs4 with filesystem for nfs is: /sapnfs Cluster start without problems. But I cannnot move RG (with... (3 Replies)
Discussion started by: giobuon
3 Replies

7. AIX

Enable large filesize option in NFS mount in AIX 4.3

Hi All, I have a NFS mount filesystem, however it is not supporting a creation of filesize greater than 2 GB in it, how can i enable the option (bf = true) in it. The AIX version is 4.3.2 Thanks in Advance!! (1 Reply)
Discussion started by: mad_man12
1 Replies

8. Red Hat

NFS-Mount issue

Hi, While i try to mount the NFS file system on the client linux server i am getting the error message as (4 Replies)
Discussion started by: gsiva
4 Replies

9. Red Hat

NFS mount issue

Hi Friends, My source server is HP and my destination is linux. I have to mount a dir thru nfs from source to destn. almost 8 servers i did the same thing and it is working fine but on the 9th server i can't able to mount. Everything i have did for nfs configuration.Even i can able to ping... (1 Reply)
Discussion started by: Mohamed Thamim
1 Replies

10. Red Hat

NFS mount issue

we are facing a weird NFS mount issue on one of the linux host , a NFS volume of 2.4TB is mounted in the linux host , but df only reports 131g , which exactly matches rootfilesytem size nfs mount filer_filer1:/vol/bug_test/q0 131G 116G 8.5G 94% /nas/bug_test root... (2 Replies)
Discussion started by: skamal4u
2 Replies
SG(1)                                                              User Commands                                                             SG(1)

NAME
sg - execute command as different group ID SYNOPSIS
sg [-] [group [-c ] command] DESCRIPTION
The sg command works similar to newgrp but accepts a command. The command will be executed with the /bin/sh shell. With most shells you may run sg from, you need to enclose multi-word commands in quotes. Another difference between newgrp and sg is that some shells treat newgrp specially, replacing themselves with a new instance of a shell that newgrp creates. This doesn't happen with sg, so upon exit from a sg command you are returned to your previous group ID. CONFIGURATION
The following configuration variables in /etc/login.defs change the behavior of this tool: SYSLOG_SG_ENAB (boolean) Enable "syslog" logging of sg activity. FILES
/etc/passwd User account information. /etc/shadow Secure user account information. /etc/group Group account information. /etc/gshadow Secure group account information. SEE ALSO
id(1), login(1), newgrp(1), su(1), gpasswd(1), group(5), gshadow(5). shadow-utils 4.5 01/25/2018 SG(1)
All times are GMT -4. The time now is 02:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy