[opensuse] AutoFS somewhat complex...
Hi list and gurus I just setup an 11.2 that uses an external NFS box for /home. This works just fine until one tries to fire up, say Firefox. Which breaks because of its use of SQLITE for storing visited sites, history and so. It's a known filelocking problem I think. So, for that reason (and a few other programs with the same problem...), I cannot use NFS for external /home. Now, I'd like to use the local disks for /home but NFS and AutoFS for individual 'Documents' directories, one for each user. I setup the NFS server box with /DOCUMENTS/user-a /DOCUMENTS/user-b /DOCUMENTS/user-c /DOCUMENTS/user-d ... /DOCUMENTS/user-x That's a little work, but I can fix (script) it. So I now have an NFS exported directory named NFS:/volume1/DOCUMENTS and this documents directory contains a large number of subdirs, all named after the users that exists on the client. On the client I can get a 'standard' NFS /home thing to work. But now in auto.master and the other autofs.files I need to use wildcards for substitution of the logged in users name. eh...now I'm stuck. Any hints or good ideas? Is this at all doable? PS: I read the openSuSE documentation on the matter - and also this link http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch29_:_Remot... As always - thanks a lot for any answers! -- ------------------------------ Med venlig hilsen/Best regards Verner Kjærsgaard -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Am Samstag, 10. April 2010 schrieb Verner Kjærsgaard:
[...] On the client I can get a 'standard' NFS /home thing to work. But now in auto.master and the other autofs.files I need to use wildcards for substitution of the logged in users name.
eh...now I'm stuck. Any hints or good ideas?
Yes, that was a bit tricky. I did something similar with CIFS: | My /etc/auto.cifs looks like this: | * -fstype=cifs,user=${USER},credentials=${HOME}/.cifs_credentials ://nas.local/& | | '*' is the wildcard key and '&' gets replaced by the provided key. | "${USER}" gets replaced by the user login name and "${HOME}" by their home directory. http://lists.opensuse.org/opensuse/2010-03/msg01007.html
Is this at all doable?
Try it. :) HTH Jan -- Ran DiskDoctor successfully? Kinda like "Crashed my car successfully. (Dave Haynie) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Jan Ritzerfeld skrev:
Am Samstag, 10. April 2010 schrieb Verner Kjærsgaard:
[...] On the client I can get a 'standard' NFS /home thing to work. But now in auto.master and the other autofs.files I need to use wildcards for substitution of the logged in users name.
eh...now I'm stuck. Any hints or good ideas?
Yes, that was a bit tricky. I did something similar with CIFS: | My /etc/auto.cifs looks like this: | * -fstype=cifs,user=${USER},credentials=${HOME}/.cifs_credentials ://nas.local/& | | '*' is the wildcard key and '&' gets replaced by the provided key. | "${USER}" gets replaced by the user login name and "${HOME}" by their home directory. http://lists.opensuse.org/opensuse/2010-03/msg01007.html
Is this at all doable?
Try it. :)
HTH Jan
Hi again and thank you for your input. - I tried to get it running according to your lines...without much succes. The problem lies in the 'auto.nfs' file (this is what I named it), I can't seem to get the autofs to fetch the username and use it. Say like this: remotenfs/${USER}... This creates a directory structure like this...: /mnt/syn/remotenfs/${USER} - in other words, it takes the ${USER} rather litterally. I also tried with schemes like `whoami` and even with ``whoami``. Incredibly enough, it creates directories with these names litterally...and they duly disapear when I shut down autofs. Any ideas as to how I may get the username into the line in the auto.nfs file? PS: I also tried a two liner like this user=`whoami` remotefs/$user without succes... Again, thank you! -- ------------------------------ Med venlig hilsen/Best regards Verner Kjærsgaard O -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Verner Kjærsgaard wrote:
Hi again and thank you for your input.
- I tried to get it running according to your lines...without much succes. The problem lies in the 'auto.nfs' file (this is what I named it), I can't seem to get the autofs to fetch the username and use it.
Say like this: remotenfs/${USER}...
This creates a directory structure like this...:
/mnt/syn/remotenfs/${USER}
Not sure how your entry really looks, but ${USER} seems wrong. The syntax there should be * server:/export/home/& where auto.master, say, points /remotenfs to auto.nfs Then any reference to /remotenfs/<key> will be looked up as server:/export/home/<key> (Sorry if that is not what you were aming for - I missed the first part of the thread) Pit -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Am Sonntag, 11. April 2010 schrieb Peter Suetterlin:
Verner Kjærsgaard wrote: [...]
Say like this: remotenfs/${USER}... [...] Not sure how your entry really looks, but ${USER} seems wrong. [...]
That was my first thought, too. But, man 5 autofs says: [...] FORMAT [...] key [-options] location [...] Variable Substitution The following special variables will be substituted in the key and location fields of an automounter map if prefixed with $ as customary ^^^^^^^^ from shell scripts (Curly braces can be used to separate the field name): [...] Gruß Jan -- You can't hold a man down without staying down with him. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Am Samstag, 10. April 2010 schrieb Verner Kjærsgaard:
[...] - I tried to get it running according to your lines...without much succes. The problem lies in the 'auto.nfs' file (this is what I named it), I can't seem to get the autofs to fetch the username and use it.
Say like this: remotenfs/${USER}...
This creates a directory structure like this...:
/mnt/syn/remotenfs/${USER} [...]
What is the complete entry line in your auto.nfs file? And, did you reload the configuration by "rcautofs reload"? I added the following entry to my auto.nfs file: backup -fstype=nfs,hard,intr,nodev,nosuid nas.local:/backup/${USER} and it worked as expected: In the backup nfs share, there is a directory called "jan" that got mounted when I accessed the mapped backup directory on my local computer. However, the first times I tried to set up wildcards and variable substitution, I experienced exactly the same problems! IIRC, I did not change anything but waited some time and restarted the autofs deamon, waited some some restarted... until it finally worked. Gruß Jan -- If rats are experimented on, they will develop cancer. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Jan Ritzerfeld skrev:
Am Samstag, 10. April 2010 schrieb Verner Kjærsgaard:
[...] - I tried to get it running according to your lines...without much succes. The problem lies in the 'auto.nfs' file (this is what I named it), I can't seem to get the autofs to fetch the username and use it.
Say like this: remotenfs/${USER}...
This creates a directory structure like this...:
/mnt/syn/remotenfs/${USER} [...]
What is the complete entry line in your auto.nfs file? And, did you reload the configuration by "rcautofs reload"?
I added the following entry to my auto.nfs file: backup -fstype=nfs,hard,intr,nodev,nosuid nas.local:/backup/${USER} and it worked as expected: In the backup nfs share, there is a directory called "jan" that got mounted when I accessed the mapped backup directory on my local computer.
However, the first times I tried to set up wildcards and variable substitution, I experienced exactly the same problems! IIRC, I did not change anything but waited some time and restarted the autofs deamon, waited some some restarted... until it finally worked.
Gruß Jan
Hi everybody - thank you for your inputs. - I was aware of the *& substitutions...but I couldn't read/understand how to use them. - I'm now going to try out Jan's suggestions. I'll keep you posted! - if it's of any help, the entire reason for this exercise is this: a) I wanted to use remote/nfs'd storage for /home b) I can't, because Firefox (and other programs too) breaks. It's a known bug. c) I'm forced to use /home on local harddisk in the box. Space here is limited. d) I then wish to have - say - /home/someuser/Documents mounted externally using nfs. This way a very limited space would be used locally and the brunt of storage would be remote. -- ------------------------------ Med venlig hilsen/Best regards Verner Kjærsgaard -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Verner Kjærsgaard wrote:
Hi everybody
- thank you for your inputs. - I was aware of the *& substitutions...but I couldn't read/understand how to use them. - I'm now going to try out Jan's suggestions. I'll keep you posted! - if it's of any help, the entire reason for this exercise is this:
a) I wanted to use remote/nfs'd storage for /home b) I can't, because Firefox (and other programs too) breaks. It's a known bug. c) I'm forced to use /home on local harddisk in the box. Space here is limited. d) I then wish to have - say - /home/someuser/Documents mounted externally using nfs. This way a very limited space would be used locally and the brunt of storage would be remote.
Hi Verner, So in that case I would - set up an NFS server that exports, say /export/<user> - set up NFS mounts on the desktop for, e.g., /extern using the */& keys - for each user, make ~/Documents a symbolic link to /extern/<user> -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Peter Suetterlin skrev:
Verner Kjærsgaard wrote:
Hi everybody
- thank you for your inputs. - I was aware of the *& substitutions...but I couldn't read/understand how to use them. - I'm now going to try out Jan's suggestions. I'll keep you posted! - if it's of any help, the entire reason for this exercise is this:
a) I wanted to use remote/nfs'd storage for /home b) I can't, because Firefox (and other programs too) breaks. It's a known bug. c) I'm forced to use /home on local harddisk in the box. Space here is limited. d) I then wish to have - say - /home/someuser/Documents mounted externally using nfs. This way a very limited space would be used locally and the brunt of storage would be remote.
Hi Verner,
So in that case I would
- set up an NFS server that exports, say /export/<user> - set up NFS mounts on the desktop for, e.g., /extern using the */& keys - for each user, make ~/Documents a symbolic link to /extern/<user>
- Hi list and Peter, - thank you for your input! - eh...but I've got +250 users on that system. Would this not force me to setup +250 exports on the NFS server?? - or do you say that this would/is solved by the magic of the */& keys? - in that case....I still don't get it (that is, the magic of the */& wildcards). -- ------------------------------ Med venlig hilsen/Best regards Verner Kjærsgaard -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Verner Kjærsgaard wrote:
Hi Verner,
So in that case I would
- set up an NFS server that exports, say /export/<user> - set up NFS mounts on the desktop for, e.g., /extern using the */& keys - for each user, make ~/Documents a symbolic link to /extern/<user>
- Hi list and Peter, - thank you for your input!
- eh...but I've got +250 users on that system. Would this not force me to setup +250 exports on the NFS server??
No, if you export /export on the NFS server, you can mount /export/<subdir> from any allowed host. So you need only one export. And on the client side indeed the wildcard will do the magic, i.e., a user (call him jim) wants to access /home/jim/Documents. This will be a link to /extern/jim, and /extern is handled by auto.nfs which contains the entry * yourserver:/export/& That line will convert your request (/export/jim) to the proper request (yourserver:/export/jim) and mount it on /extern/jim so that jim can access it via the symlink....
- or do you say that this would/is solved by the magic of the */& keys?
Yes :-) Pit -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Peter Suetterlin skrev:
Verner Kjærsgaard wrote:
Hi Verner,
So in that case I would
- set up an NFS server that exports, say /export/<user> - set up NFS mounts on the desktop for, e.g., /extern using the */& keys - for each user, make ~/Documents a symbolic link to /extern/<user>
- Hi list and Peter, - thank you for your input!
- eh...but I've got +250 users on that system. Would this not force me to setup +250 exports on the NFS server??
No, if you export /export on the NFS server, you can mount /export/<subdir> from any allowed host. So you need only one export.
And on the client side indeed the wildcard will do the magic, i.e., a user (call him jim) wants to access /home/jim/Documents. This will be a link to /extern/jim, and /extern is handled by auto.nfs which contains the entry * yourserver:/export/&
That line will convert your request (/export/jim) to the proper request (yourserver:/export/jim) and mount it on /extern/jim so that jim can access it via the symlink....
- or do you say that this would/is solved by the magic of the */& keys?
Yes :-)
Pit
Hi Peter and everyone else :-) I can't get my head right...please bear with me and correct me here. This is my auto.master file: /extern /etc/auto.nfs This is my auto.nfs file: * 172.16.11.229:/volume1/EXPORT/& (the export works ok generally, I can mount the stuff manually and so forth) This is my / directory (snip): ... drwxr-xr-x 2 root root 4096 13 apr 15:49 extern/ ... Now I also tried setting up an 'extern' directory with a subdir beneath it named 'vk'. I then tried with symlinks from /home/vk like these: ln -s /extern myfiles and ln -s /extern/vk myfiles It appears that I can 'cd' into 'myfiles', but I cannot do a 'touch xxx.yyy' in the directory. No permissions or so. Q: should the original /extern directory have 755 or 777 rights? Q: should each individual user have his own subdir beneath it, created manually before autofs is started? Q: the symlink created in /home/vk, should this point to /extern or to /extern/vk? Once again...I really do appreciate your inputs! Thanks a lot. PS: I did restart 'rcautofs restart' the autofs after each change in the files. -- ------------------------------ Med venlig hilsen/Best regards Verner Kjærsgaard -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Verner Kjærsgaard wrote:
Hi Peter and everyone else :-)
I can't get my head right...please bear with me and correct me here.
This is my auto.master file: /extern /etc/auto.nfs
This is my auto.nfs file: * 172.16.11.229:/volume1/EXPORT/&
Fine.
(the export works ok generally, I can mount the stuff manually and so forth)
Then also check permissions, i.e., when you manually mount 172.16.11.229:/volume1/EXPORT/vk, can you read/write as user vk there? That's a general issue, unrelated to the specific problem.
This is my / directory (snip): ... drwxr-xr-x 2 root root 4096 13 apr 15:49 extern/ ...
Also fine.
Now I also tried setting up an 'extern' directory with a subdir beneath it named 'vk'.
You shouldn't. /extern should be empty when you start autofs
I then tried with symlinks from /home/vk like these: ln -s /extern myfiles
No.
and ln -s /extern/vk myfiles
Yes.
It appears that I can 'cd' into 'myfiles', but I cannot do a 'touch xxx.yyy' in the directory. No permissions or so.
See above. Permissions and owner of the directory on the server have to be correct. You'll have to set that on the server as on the client root is mapped to nobody.
Q: should the original /extern directory have 755 or 777 rights?
Shouldn't matter much, but I'd recommend 755
Q: should each individual user have his own subdir beneath it, created manually before autofs is started?
No, autofs does that normally, either on start, or when it is requested.
Q: the symlink created in /home/vk, should this point to /extern or to /extern/vk?
The latter, to /extern/vk
Once again...I really do appreciate your inputs! Thanks a lot.
You're welcome ;^> Pit -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Peter Suetterlin skrev:
Verner Kjærsgaard wrote:
Hi Peter and everyone else :-)
I can't get my head right...please bear with me and correct me here.
This is my auto.master file: /extern /etc/auto.nfs
This is my auto.nfs file: * 172.16.11.229:/volume1/EXPORT/&
Fine.
(the export works ok generally, I can mount the stuff manually and so forth)
Then also check permissions, i.e., when you manually mount 172.16.11.229:/volume1/EXPORT/vk, can you read/write as user vk there? That's a general issue, unrelated to the specific problem.
This is my / directory (snip): ... drwxr-xr-x 2 root root 4096 13 apr 15:49 extern/ ...
Also fine.
Now I also tried setting up an 'extern' directory with a subdir beneath it named 'vk'.
You shouldn't. /extern should be empty when you start autofs
I then tried with symlinks from /home/vk like these: ln -s /extern myfiles
No.
and ln -s /extern/vk myfiles
Yes.
It appears that I can 'cd' into 'myfiles', but I cannot do a 'touch xxx.yyy' in the directory. No permissions or so.
See above. Permissions and owner of the directory on the server have to be correct. You'll have to set that on the server as on the client root is mapped to nobody.
Q: should the original /extern directory have 755 or 777 rights?
Shouldn't matter much, but I'd recommend 755
Q: should each individual user have his own subdir beneath it, created manually before autofs is started?
No, autofs does that normally, either on start, or when it is requested.
Q: the symlink created in /home/vk, should this point to /extern or to /extern/vk?
The latter, to /extern/vk
Once again...I really do appreciate your inputs! Thanks a lot.
You're welcome ;^>
Pit
Hi list and P., - I've got some interesting (I hope...) debug info. - first, a manual mount of nfsserver:/export, it goes like this and it works perfectly fine: --- linux-3fm3:/ # mount -t nfs 172.16.11.229:/volume1/EXPORT /mnt/syn -o rw linux-3fm3:/ # cd /mnt/syn linux-3fm3:/mnt/syn # l totalt 8 linux-3fm3:/mnt/syn # cd / linux-3fm3:/ # umount /mnt/syn linux-3fm3:/ # --- I then SSH'd into the Synology DS209 box to look into the /var/log/messages of that box. I also set /etc/sysconfig/autofs in SuSE to 'verbose' logging. I then start up autofs with 'rcautofs start' These are my results (the contents of auto.master and auto.nfs are not modified): --- I start autofs, in the log I see: Apr 13 21:24:40 linux-3fm3 automount[24082]: Starting automounter version 5.0.3, master map auto.master Apr 13 21:24:40 linux-3fm3 automount[24082]: using kernel protocol version 5.00 Apr 13 21:24:40 linux-3fm3 automount[24082]: mounted indirect mount for /extern with timeout 600, freq 150 seconds Apr 13 21:24:40 linux-3fm3 automount[24082]: ghosting enabled --- As far as I can see, this look really good. I then carry on (using my regular vk account in another konsole) with 'ln -s /extern/vk myfiles' This succeeds in that I get no errors - but also no activity at all in either logfile(s). I then try to list the contents of directory 'myfiles', in SuSE I type 'l': In the client, nothing happens at all. Well, the symlink is displayed in RED colour, it appears to be broken. But...there was NO ERROR when I established it. In the SYNOLOGY server however, I see this in the /var/log/messages: --- Apr 13 21:26:28 mountd[3256]: can't stat exported dir /volume1/EXPORT/vk -o rw: No such file or directory --- Well...eh...that's not so difficult to understand in that the 'vk' subdir indeed does not exist. This is where I'm stuck. I don't understand what's going on. Any ideas? -- ------------------------------ Med venlig hilsen/Best regards Verner Kjærsgaard -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Hi Verner,
Hi list and P.,
- I've got some interesting (I hope...) debug info. - first, a manual mount of nfsserver:/export, it goes like this and it works perfectly fine:
--- linux-3fm3:/ # mount -t nfs 172.16.11.229:/volume1/EXPORT /mnt/syn -o rw linux-3fm3:/ # cd /mnt/syn linux-3fm3:/mnt/syn # l
This doesn't yet tell too much. You only mounted the top level directory, and that as root.
As far as I can see, this look really good. I then carry on (using my regular vk account in another konsole) with 'ln -s /extern/vk myfiles' This succeeds in that I get no errors - but also no activity at all in either logfile(s).
That is normal. You can create any link to a non-existent file without error messages.
I then try to list the contents of directory 'myfiles', in SuSE I type 'l':
In the client, nothing happens at all. Well, the symlink is displayed in RED colour, it appears to be broken. But...there was NO ERROR when I established it.
In the SYNOLOGY server however, I see this in the /var/log/messages:
--- Apr 13 21:26:28 mountd[3256]: can't stat exported dir /volume1/EXPORT/vk -o rw: No such file or directory ---
Well...eh...that's not so difficult to understand in that the 'vk' subdir indeed does not exist.
OK, now we're getting somewhere. Of course those do have to exist on the NFS server, just like it would be the case for a complete NFS HOME setup. So what I (thought I) understood you wanted is /home/<user> on the local disk and /home<user>/Documents coming via NFS. For this, the directory on the other end has to exist, and have the proper permissions. I.e., on the server you will have to create the /volume1/EXPORT/<user> directories, chown each to <user> (or the appropriate user ID if the users are not known on the server) and probably chmod 700 them so only the user can read it. If the NFS server has access to the userlist (/etc/passwd or similar) that step can be automated, but it's definitely needed for my described setup to work.
This is where I'm stuck. I don't understand what's going on.
Well, I do, but I guess I missunderstood what you want. You want the users to be able to create arbitrary directories on the NFS server, is it that? That of course would be (from the permissions point) quite similar to how /tmp is set up, and you don't need autofs for that but just one general (fixed) mount for the root of the NFS... Pit -- Dr. Peter "Pit" Suetterlin http://www.astro.su.se/~pit Institute for Solar Physics Tel.: +34 922 405 590 (Spain) P.Suetterlin@royac.iac.es +46 8 5537 8507 (Sweden) Peter.Suetterlin@astro.su.se -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Peter Suetterlin skrev:
Hi Verner,
Hi list and P.,
...lots of text has been cutaway..
So what I (thought I) understood you wanted is /home/<user> on the local disk and /home<user>/Documents coming via NFS. For this, the directory on the other end has to exist, and have the proper permissions. I.e., on the server you will have to create the /volume1/EXPORT/<user> directories, chown each to <user> (or the appropriate user ID if the users are not known on the server) and probably chmod 700 them so only the user can read it.
... Hi list and P., - like you say, now we're getting somewhere! - indeed what you say in the paragraph above is what I'm going to do. - and...further, Yes I'll have to create individual directories per user. But...that I can script my way out of and so. I'm not able to test it out right now, but I'm quite sure, it'll work. Again, thanks a lot for your kind help. I'll get back to the list with my results. -- ------------------------------ Med venlig hilsen/Best regards Verner Kjærsgaard -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Verner Kjærsgaard skrev:
Peter Suetterlin skrev:
Hi Verner,
Hi list and P.,
...lots of text has been cutaway.. So what I (thought I) understood you wanted is /home/<user> on the local disk and /home<user>/Documents coming via NFS. For this, the directory on the other end has to exist, and have the proper permissions. I.e., on the server you will have to create the /volume1/EXPORT/<user> directories, chown each to <user> (or the appropriate user ID if the users are not known on the server) and probably chmod 700 them so only the user can read it.
...
Hi list and P.,
- like you say, now we're getting somewhere!
- indeed what you say in the paragraph above is what I'm going to do. - and...further, Yes I'll have to create individual directories per user. But...that I can script my way out of and so.
I'm not able to test it out right now, but I'm quite sure, it'll work. Again, thanks a lot for your kind help. I'll get back to the list with my results.
Hi gurus and list, - I promissed to get back with my results - and here they are. - thanks to you guys it WORKS! - this is what I did: ON THE CLIENT ------------- this is the contents of /etc/auto.master /extern /etc/auto.nfs this is contents of /etc/auto.nfs * 172.16.11.229:/volume1/SYNDOCS/& this is the contents of /etc/profile.local: #!/bin/bash user=`whoami` usernum=`id -u $user` cd /home/$user ### -h TRUE if file exist AND IS A SYMLINK ### MINEFILER = MYFILES in english if [ ! -h MINEFILER ]; then ln -s /extern/$user MINEFILER 2>&1 fi ### Copy known_hosts file to the home-dir of ### the new user ### only at first login, otherwise not ### if [ ! -e /home/$user/.ssh/known_hosts ]; then mkdir -p /home/$user/.ssh cat /opt/scripts/known_hosts_syn >> /home/$user/.ssh/known_hosts fi ### Now call a script placed in the SYN box ssh -i /opt/scripts/id_rsa root@172.16.11.229 /opt/scripts/checkuser.sh $user $usernum I then copied root's very secret id_rsa file outside roots home into /opt/scripts and made it readable. So the /etc/profile.local script can log into the server with SSH (as root) and to its things. THIS IS A MAJOR SECURITY BREACH!! Yes, I know. Any ideas? The /etc/profile.local runs as the local user, not root. So this file cannot satisfy SSH with respect to identity and so. ON THE SERVER ------------- I placed SSH keys and so, to enable password/promptless login from the client. I placed this script in /opt/scripts/ on the SYN box (note the use of ash, not bash...): #!/bin/ash #$1 = user #$2 = usernum (numerisk) user=$1 usernum=$2 if [ ! -d /volume1/SYNDOCS/$user ]; then mkdir /volume1/SYNDOCS/$user chown $usernum.100 /volume1/SYNDOCS/$user chmod -R 700 /volume1/SYNDOCS/$user fi exit 0 Now I fired up 'rcautofs' and was airborne. Every new user now has a directory under his homedir name MYFILES. The files put the will reside off-server. Again, thanks to all for their great and appreciated help! -- ------------------------------ Med venlig hilsen/Best regards Verner Kjærsgaard -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Verner Kjærsgaard wrote:
a) I wanted to use remote/nfs'd storage for /home
This is a bad idea nowadays when users have graphical logins. Any problem with NFS means their system becomes unusable. Better to have a local home and NFS mount the subdirectories (or more likely, NFS-mount one directory and symlink the various subdirectories to it). Cheers, Dave -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Verner Kjærsgaard said the following on 04/11/2010 03:09 PM:
a) I wanted to use remote/nfs'd storage for /home
That seems perfectly reasonable to me. SUN ("The Network is the Computer") was doing this back in the 1980s. You could log in from any workstation and LO! there was your home directory. Workstations were minimalist and accounts were managed by YP. This is all well documented. I've implemented this kind of thing at various sites with SunOS, Solaris, AIX and RedHat. Go google. E.g. http://www.freebsd.org/doc/en/books/handbook/network-nfs.html <quote> There is no need for users to have separate home directories on every network machine. Home directories could be set up on the NFS server and made available throughout the network. .... On large networks, it might be more convenient to configure a central NFS server in which to store all the user home directories. These home directories can then be exported to the network so that users would always have the same home directory, regardless of which workstation they log in to. ... </quote> and http://www.freebsd.org/doc/en/books/handbook/network-nis.html <quote> It (YP/NIS) is a RPC-based client/server system that allows a group of machines within an NIS domain to share a common set of configuration files. This permits a system administrator to set up NIS client systems with only minimal configuration data and add, remove or modify configuration data from a single location. It is similar to the Windows NT® domain system; although the internal implementation of the two are not at all similar, the basic functionality can be compared. </quote> Of course BSD isn't quite Linux:-) But then it wasn't quite Solaris or AIX either, but I didn't find that a problem. However you might have a look at this http://www.linbai.info/science-engineering/managing-nfs-and-nis-2nd-edition.... and download the free copy.
b) I can't, because Firefox (and other programs too) breaks. It's a known bug.
Oh? I have a laptop with ~/.mozilla, ~/Documents, ~/Media and a few others NFS'd from a file server. I have problems, but they are with KDE4.4.2 :-) and Xorg and the Radeon driver, but that's another matter.
c) I'm forced to use /home on local harddisk in the box. Space here is limited.
Some of the old SUN workstations were really minimal, maybe a 3Meg disk and everything else by NFS/NIS
d) I then wish to have - say - /home/someuser/Documents mounted externally using nfs. This way a very limited space would be used locally and the brunt of storage would be remote.
Yes, I do this for my laptop even without NIS. -- The future, according to some scientists, will be exactly like the past, only far more expensive. -- John Sladek -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Also http://www.ibm.com/developerworks/aix/library/au-linuxtogether/index.html <quote> The automounter becomes particularly useful when sharing user directories -- individuals can log in to any machine and have their home directory automatically mounted and available to them from a remote NFS server. </quote> -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (5)
-
Anton Aylward
-
Dave Howorth
-
Jan Ritzerfeld
-
Peter Suetterlin
-
Verner Kjærsgaard