Re: Autofs and NFS, user mapping
On Thu, Aug 2, 2012 at 12:38 AM, T o n g mlist4sunt...@yahoo.com wrote: On Tue, 31 Jul 2012 10:44:14 -0400, Tom H wrote: 1) Does the mount work if you export with nfsv3 specified? Hmm... that might be the way. How can I do that? I remember that I have to specify nfsv3 on the client/nfsmount side to get the straight-mount work for my uid and gid. On the client, add nfsvers=3 to the options of your nfs map. OR On the server, add --no-nfs-version 4 to RPCMOUNTDOPTS in /etc/default/nfs-kernel-server. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/CAOdo=sywa_350sgoij4-49apgts_2zyexd_9ciyhpppyhop...@mail.gmail.com
Re: Autofs and NFS, user mapping
On Tue, Jul 31, 2012 at 11:20 PM, Bob Proulx b...@proulx.com wrote: T o n g wrote: Bob Proulx wrote: T o n g wrote: My Autofs auto-mounted NFS share looks like this: A pet peeve of mine is share. Windows has shares. Unix has filesystems. NFS is itself a Network File System. So saying Network File System Share feels like saying a Personal PIN Number. It would make me happier if people just referred to them as filesystems. Share is at least partially right because on Solaris, from where nfs comes, you create an nfs export with share ..., exported filesystems are listed in /etc/dfs/sharetab, and you list available shares on a server with dfshares [server]. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/CAOdo=SzZwsNytBjd=iPGbGvLzcpGhO5ZY0jS_H=6gNfaV-a=t...@mail.gmail.com
Re: Autofs and NFS, user mapping
Tom H wrote: Bob Proulx wrote: A pet peeve of mine is share. Windows has shares. Unix has filesystems. NFS is itself a Network File System. So saying Network File System Share feels like saying a Personal PIN Number. It would make me happier if people just referred to them as filesystems. Share is at least partially right because on Solaris, from where nfs comes, you create an nfs export with share ..., exported filesystems are listed in /etc/dfs/sharetab, and you list available shares on a server with dfshares [server]. Oh... Alright. (head hanging down dejectedly, kicks floor with foot) I should be more tolerant. :-) Thanks! Bob signature.asc Description: Digital signature
Re: Autofs and NFS, user mapping
On Tue, 31 Jul 2012 10:44:14 -0400, Tom H wrote: 1) Does the mount work if you export with nfsv3 specified? Hmm... that might be the way. How can I do that? I remember that I have to specify nfsv3 on the client/nfsmount side to get the straight-mount work for my uid and gid. Thanks -- Tong (remove underscore(s) to reply) http://xpt.sourceforge.net/techdocs/ http://xpt.sourceforge.net/tools/ -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/jvd08g$tdi$1...@dough.gmane.org
Re: Autofs and NFS, user mapping
On Sun, Jul 29, 2012 at 2:37 PM, T o n g mlist4sunt...@yahoo.com wrote: My Autofs auto-mounted NFS share looks like this: drwxr-xr-x 9 4294967294 4294967294 45056 2011-04-12 09:47 tmp/ I.e., the user id and group id are all mapped wrong. I have identical user ids and groups between my NFS sharing stations, so previously, prior to using Autofs I just use the NFS ver3 direct mapping, without specifying any user mapping schemes, and it works nicely. Now I started to use Autofs, but everything get messed up. I've read many web pages, but none of them mentioned about this problem. I also tried to specify uid=1000,gid=1000,allow_other, which I found in https://help.ubuntu.com/community/Autofs/, but it doesn't work for my nfs. 1) Does the mount work if you export with nfsv3 specified? 2) Does the mount work if you export with fsid=0 specified? (Keeping in mind that if you specify that /path/to/export is exported with fsid=0, the mount of /path/to/export is /.) -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/CAOdo=sz__irjhxfzdsnaf-1sabttj5yq23bydyrzrebubpm...@mail.gmail.com
Re: Autofs and NFS, user mapping
T o n g wrote: Bob Proulx wrote: T o n g wrote: My Autofs auto-mounted NFS share looks like this: A pet peeve of mine is share. Windows has shares. Unix has filesystems. NFS is itself a Network File System. So saying Network File System Share feels like saying a Personal PIN Number. It would make me happier if people just referred to them as filesystems. drwxr-xr-x 9 4294967294 4294967294 45056 2011-04-12 09:47 tmp/ Of course that looks like either the 'nobody' user and group or it looks like a -1 error being propagated. Probably just the nobody user and group. I.e., the user id and group id are all mapped wrong. Because you said the user id and group id are mapped wrong I suggested to be aware of the --manage-gids option because it changes the behavior of how users and groups are looked up. For me it is a source of problem because I don't usually give users accounts on the NFS server machines. But if --manage-gids is in effect then I would need to in order to have the server look up their account data. For me that is just wrong. However for the bug reporter that I referenced not having all of the groups were for them just wrong too. The solution is mutually exclusive. One or the other works but not both. I have identical user ids and groups between my NFS sharing stations, Just say workstations that have the same NFS filesystem mounted or something to that effect. So you are saying to remove it? No. I am not sure that is your problem. It might be. Not sure. You didn't include enough information for anyone to know. But since you have that information and looking at the way the --manage-gids works should be able to tell if that is your issue or not. It definitely changes the way account data is looked up. I did that and restarted my nfs-kernel-server. Now: $ ps -ef | grep rpc.mountd root 12869 1 0 Jul30 ?00:00:00 /usr/sbin/rpc.mountd However, on the client side, Autofs still show the wrong uid and gid. Same as in OP. Then that is not your problem. I think you have improved things though. Anywhere else to check? Let's back up and start through the debug path. 'ls' is going to stat(2) calls to look up information about those files. The user and group displayed are mapped through the number stored in the file's inode metadata. You can see the actual numbers by using the 'ls -n' option. Or by using 'stat'. $ ls -ldn yourfoo drwxr-xr-x 60 1000 1000 4096 Jul 31 18:59 yourfoo $ stat youfoo File: `yourfoo' Size: 4096Blocks: 8 IO Block: 4096 directory Device: fe02h/65026dInode: 3932162 Links: 60 Access: (0755/drwxr-xr-x) Uid: ( 1000/ rwp) Gid: ( 1000/ rwp) Access: 2012-07-31 12:44:16.104414486 -0600 Modify: 2012-07-31 18:59:12.254911408 -0600 Change: 2012-07-31 18:59:12.254911408 -0600 See the user and group numbers? The 1000. That is my user id. After obtaining the number the ls program will look up the matching name assocatied with that number. In Unix everything is done with the number. But people like the name to be displayed. To look up the number from the command line there are a number of different tools and different ways. GNU glibc provides 'getent' specifically for this purpose so I will quote it. But with NIS/yp it would be ypcat or ypmatch. With a traditional Unix system it would simply be 'grep' of the account from /etc/passwd. $ getent passwd 1000 rwp:x:1000:1000:Bob Proulx,,,:/home/rwp:/bin/bash $ getent group 1000 rwp:x:1000: So that completes path from getting the user and group numbers assocatied with a file. (And directories are simply files. Just special files.) And then converting the number to a name. If the number does not have an associated name in the password or group databases (/etc/passwd or /etc/group files) then the number itself is printed. With the above hints what is going on with your system? Bob signature.asc Description: Digital signature
Re: Autofs and NFS, user mapping
On Sun, 29 Jul 2012 18:06:31 -0600, Bob Proulx wrote: T o n g wrote: My Autofs auto-mounted NFS share looks like this: drwxr-xr-x 9 4294967294 4294967294 45056 2011-04-12 09:47 tmp/ I.e., the user id and group id are all mapped wrong. I have identical user ids and groups between my NFS sharing stations, so previously, prior to using Autofs I just use the NFS ver3 direct mapping, without specifying any user mapping schemes, and it works nicely. Do you have --manage-gids in /etc/default/nfs-kernel-server set? $ ps -ef | grep rpc.mountd root 1527 1 0 Jul10 ?00:00:33 /usr/sbin/rpc.mountd --manage-gids While this is a bug fix[1] for some it is a bug source for me. [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=493059 Thanks for your replay, Bob. I have that too. $ ps -ef | grep rpc.mountd root 1539 1 0 Jul07 ?00:00:00 /usr/sbin/rpc.mountd -- manage-gi So you are saying to remove it? I did that and restarted my nfs-kernel-server. Now: $ ps -ef | grep rpc.mountd root 12869 1 0 Jul30 ?00:00:00 /usr/sbin/rpc.mountd However, on the client side, Autofs still show the wrong uid and gid. Same as in OP. Anywhere else to check? Thanks -- Tong (remove underscore(s) to reply) http://xpt.sourceforge.net/techdocs/ http://xpt.sourceforge.net/tools/ -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/jv7lgn$n9$1...@dough.gmane.org
Autofs and NFS, user mapping
Hi, My Autofs auto-mounted NFS share looks like this: drwxr-xr-x 9 4294967294 4294967294 45056 2011-04-12 09:47 tmp/ I.e., the user id and group id are all mapped wrong. I have identical user ids and groups between my NFS sharing stations, so previously, prior to using Autofs I just use the NFS ver3 direct mapping, without specifying any user mapping schemes, and it works nicely. Now I started to use Autofs, but everything get messed up. I've read many web pages, but none of them mentioned about this problem. I also tried to specify uid=1000,gid=1000,allow_other, which I found in https://help.ubuntu.com/community/Autofs/, but it doesn't work for my nfs. Anyway, please help. Thanks -- Tong (remove underscore(s) to reply) http://xpt.sourceforge.net/techdocs/ http://xpt.sourceforge.net/tools/ -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/jv3vt4$mr$1...@dough.gmane.org
Re: Autofs and NFS, user mapping
T o n g wrote: My Autofs auto-mounted NFS share looks like this: drwxr-xr-x 9 4294967294 4294967294 45056 2011-04-12 09:47 tmp/ I.e., the user id and group id are all mapped wrong. I have identical user ids and groups between my NFS sharing stations, so previously, prior to using Autofs I just use the NFS ver3 direct mapping, without specifying any user mapping schemes, and it works nicely. Do you have --manage-gids in /etc/default/nfs-kernel-server set? $ ps -ef | grep rpc.mountd root 1527 1 0 Jul10 ?00:00:33 /usr/sbin/rpc.mountd --manage-gids While this is a bug fix[1] for some it is a bug source for me. [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=493059 Bob signature.asc Description: Digital signature