Hi.
We have many scripts which are hardcoded to use /home/httpd. This
folder have a svn-checkout, the scripts are executed as another user.
Coming from a FreeBSD background this is not a problem since all users
(except for root) by default are located beneath /home.
Ie. user foo relies on /home/httpd/bar to find fonts etc.
On solaris the default is to create an /export/home and then
dynamically locate the username relative to /home during login. But
this will not work since the files will be at /export/home/httpd
instead.
Can I circumvent this on opensolaris?
××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
If I remember correctly, as long as automounter is running an entry in /etc/auto_home (before +auto_home) like
* localhost:/export/home/&
should do the trick.
×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
Thank you for yor reply. I added the entry to /etc/auto_home but it
did not do the trick unfortunately. /etc/auto_home looks like this:
+auto_home
* localhost:/export/home/&
I also switched those two entries, and rebooted each time. I'm running
opensolaris b70b.
××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
Did you restart the automounter ?
svcadm restart autofs
××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
> There are other ways to do this, though. One is to remove the
> auto_home references from /etc/auto_master and then either mount a new
> file system directly over /home or use lofs to mount in a lower level
> directory.
I will try that instead.
××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
claus 127.0.0.1:/export/home/claus
××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
Hi Claus,
you have the "nobrowse" option to /home - which means ls /home will give nothing
(i.e. you can't browse it) - you probably need to try /home/claus or
/home/kilaasi to see anything in /home.
HTH,
×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
Nothing is supposed to show up; it's all on demand.
Try: ls -l /home/clause
×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
+auto_home
* localhost:/export/home/&
I get
tape~#>ls -l /home
ls: error reading directory /home: No such file or directory
total 4
whenever I restart autofs. Doing a 'ls /home/claus' works. And adding
the entries one by one as 'claus localhost:/export/home/claus' also
works.
**************************************************************************************
**************************************************************************************
* localhost:/export/home/&
+auto_home
does the trick, no reboot needed.
just restart the automounter after editing /etc/auto_home with
svcadm restart autofs
We have many scripts which are hardcoded to use /home/httpd. This
folder have a svn-checkout, the scripts are executed as another user.
Coming from a FreeBSD background this is not a problem since all users
(except for root) by default are located beneath /home.
Ie. user foo relies on /home/httpd/bar to find fonts etc.
On solaris the default is to create an /export/home and then
dynamically locate the username relative to /home during login. But
this will not work since the files will be at /export/home/httpd
instead.
Can I circumvent this on opensolaris?
××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
If I remember correctly, as long as automounter is running an entry in /etc/auto_home (before +auto_home) like
* localhost:/export/home/&
should do the trick.
×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
There are several different solutions to this. Here's one discussion
that is on the first page of a google.com search:
http://www.voiceworks.pl /cypromis/2007/06/10/the-magic -of-automounting-user-homedire ctories-on-solaris/
It essentially suggests adding this to /etc/auto_home:
httpd localhost:/export/home/httpd
There are other ways to do this, though. One is to remove the
auto_home references from /etc/auto_master and then either mount a new
file system directly over /home or use lofs to mount in a lower level
directory.
that is on the first page of a google.com search:
http://www.voiceworks.pl
It essentially suggests adding this to /etc/auto_home:
httpd localhost:/export/home/httpd
There are other ways to do this, though. One is to remove the
auto_home references from /etc/auto_master and then either mount a new
file system directly over /home or use lofs to mount in a lower level
directory.
××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
Thank you for yor reply. I added the entry to /etc/auto_home but it
did not do the trick unfortunately. /etc/auto_home looks like this:
+auto_home
* localhost:/export/home/&
I also switched those two entries, and rebooted each time. I'm running
opensolaris b70b.
××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
Did you restart the automounter ?
svcadm restart autofs
××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
Thank you for your reply. I also tried that as well as the other
suggestion that was posted to this thread. But httpd does not show up
in /home.
I added the entries to another test server and rebooted. These are the entries:
kilaasi 127.0.0.1:/export/home/kilaasi
claus 127.0.0.1:/export/home/claus
rozetta~%>pwd
/export/home/kilaasi
I'm using opensolaris b70b.
suggestion that was posted to this thread. But httpd does not show up
in /home.
I added the entries to another test server and rebooted. These are the entries:
kilaasi 127.0.0.1:/export/home/kilaasi
claus 127.0.0.1:/export/home/claus
rozetta~%>pwd
/export/home/kilaasi
I'm using opensolaris b70b.
> There are other ways to do this, though. One is to remove the
> auto_home references from /etc/auto_master and then either mount a new
> file system directly over /home or use lofs to mount in a lower level
> directory.
××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
Just tried but unfortunately it did not help.
rozetta~#>svcadm restart autofs
rozetta~#>ls -l /home
total 0
rozetta~#>ls -l /export/home
total 20
drwxr-x--- 6 claus staff 512 Oct 10 16:24 claus
drwxr-xr-x 16 kilaasi staff 1024 Oct 10 16:41 kilaasi
drwx------ 2 root root 8192 Oct 4 10:58 lost+found
/etc/auto_master:
+auto_master
/net -hosts -nosuid,nobrowse
/home auto_home -nobrowse
/etc/auto_home:
+auto_home
kilaasi 127.0.0.1:/export/home/kilaasirozetta~#>svcadm restart autofs
rozetta~#>ls -l /home
total 0
rozetta~#>ls -l /export/home
total 20
drwxr-x--- 6 claus staff 512 Oct 10 16:24 claus
drwxr-xr-x 16 kilaasi staff 1024 Oct 10 16:41 kilaasi
drwx------ 2 root root 8192 Oct 4 10:58 lost+found
/etc/auto_master:
+auto_master
/net -hosts -nosuid,nobrowse
/home auto_home -nobrowse
/etc/auto_home:
+auto_home
claus 127.0.0.1:/export/home/claus
××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
Hi Claus,
you have the "nobrowse" option to /home - which means ls /home will give nothing
(i.e. you can't browse it) - you probably need to try /home/claus or
/home/kilaasi to see anything in /home.
HTH,
×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
Nothing is supposed to show up; it's all on demand.
Try: ls -l /home/clause
×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
Thank you! :-) You're right. So if I change /etc/auto_home to
+auto_home
* localhost:/export/home/&
tape~#>ls -l /home
ls: error reading directory /home: No such file or directory
total 4
whenever I restart autofs. Doing a 'ls /home/claus' works. And adding
the entries one by one as 'claus localhost:/export/home/claus' also
works.
**************************************************************************************
Thank you for all who helped me in this matter.
The /home-mapping is in place, I have to manually to type 'ls
/home/foo' to make it visible beneath /home. But as long as the
scripts work it will work out just fine.
The /home-mapping is in place, I have to manually to type 'ls
/home/foo' to make it visible beneath /home. But as long as the
scripts work it will work out just fine.
**************************************************************************************
* localhost:/export/home/&
+auto_home
does the trick, no reboot needed.
just restart the automounter after editing /etc/auto_home with
svcadm restart autofs