tag:blogger.com,1999:blog-103726455645606979.post7477895601483974741..comments2013-04-09T01:47:44.896-07:00Comments on Znogger's Home: Solaris : automatic creation of home dirsznoggerhttp://www.blogger.com/profile/05123718683225207419noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-103726455645606979.post-12148443405717986082013-04-09T01:47:44.896-07:002013-04-09T01:47:44.896-07:00Greetings.
Automatic creation of home dirs doe...Greetings. <br /><br />Automatic creation of home dirs does work on the NFS server where the share /export/home is exported so the executable map script can indeed create the user_homedir (mkdir command)<br /><br />But how can we create the homedir from an NFS client where the mkdir command fails since there is no /export/home there.<br /><br />Thank you very much for your reply. Best Regards. kamel (from France).<br /><br /><br /><br /><br />Anonymoushttps://www.blogger.com/profile/07331724405400131522noreply@blogger.comtag:blogger.com,1999:blog-103726455645606979.post-59867347270817884422012-10-24T14:48:08.310-07:002012-10-24T14:48:08.310-07:00This requires installation of patch 147775-01, whi...This requires installation of patch 147775-01, which fixes executable automount maps:<br />Topic: SunOS 5.10_x86: automountd patch<br />7085850 automounter fails to execute executable automounter maps<br /><br />Strangely it does not appear to be part of a recommended patch cluster.<br /><br />I was experiencing the same problem as "aaa" and "robot", but after installing this patch, everything now works properly. Before installing the patch, the map was never even run (I put syslog calls into it, which never happened), and monitoring the automountd process with truss showed its door_call() in call_read_execout failing with EBADF -- thus it never forked and executed the map.Anonymoushttps://www.blogger.com/profile/05984831790510433129noreply@blogger.comtag:blogger.com,1999:blog-103726455645606979.post-23806020779167305142012-05-23T12:00:02.737-07:002012-05-23T12:00:02.737-07:00As the "aaa" user above me said, this do...As the "aaa" user above me said, this does not appear to work on Solaris 10 (works fine on Solaris 11). Autofs was restarted, sticky and exec bit added to /etc/auto_homedir, and the script does spit out necessary info if I run it manually (sh -x /etc/auto_homedir username).<br /><br />In automounter logs I get this:<br /><br />LOOKUP REQUEST: Wed May 23 13:54:10 2012<br />t1 name=username[] map=/etc/auto_homedir opts= path=/home direct=0<br />t1 PUSH /etc/auto_homedir<br />t1 Executable map: map=/etc/auto_homedir key=username<br />t1 call_read_execout /etc/auto_homedir username<br />t1 POP /etc/auto_homedir<br />t1 do_lookup1: action=2 wildcard=FALSE error=2<br />t1 LOOKUP REPLY : status=2<br /><br />As such, no home directory gets created.robothttps://www.blogger.com/profile/14677855590816513342noreply@blogger.comtag:blogger.com,1999:blog-103726455645606979.post-71090154989549098212011-08-11T07:33:45.434-07:002011-08-11T07:33:45.434-07:00use hdir=$HOMEDIRPATH/$1 instead of ~$1. ~$1 will ...use hdir=$HOMEDIRPATH/$1 instead of ~$1. ~$1 will give you back the / because automounter is running as root.<br /><br />another problem:<br />if [[ $hdir != $HOMEDIRPATH/* ]]; then<br /># Someone is trying to access a directory under $HOMEDIRPATH<br /># which is not the name of a user. This we simply ignore, i.e. we exit<br /># without writing anything on stdout. This will make the automounter<br /># ignore the action and thus the user will get an error.<br />exit<br />fi<br /><br />i don't understand this. <br />because of that "if statement" the automounter won't mount anything. $HOMEDIRPATH/* is empty...<br /><br />use this:<br />getent passwd $1 > /dev/null<br />if [ $? -ne 0 ]; then<br /> exit<br />fi<br /><br />this will check if the user who is logging in is exists in the passwd file, or in ldap. if yes, automounter will create the physical directory and mount or just mount the user's homedirectory.csabakollarhttps://www.blogger.com/profile/04493711592207768843noreply@blogger.comtag:blogger.com,1999:blog-103726455645606979.post-72210306750601305202010-12-20T07:18:25.407-08:002010-12-20T07:18:25.407-08:00sorry, my bad.sorry, my bad.Raivohttps://www.blogger.com/profile/11994434763285410624noreply@blogger.comtag:blogger.com,1999:blog-103726455645606979.post-11401720878843513662010-12-20T06:50:43.483-08:002010-12-20T06:50:43.483-08:00Using clean solaris 10 u9 install but auto_homedir...Using clean solaris 10 u9 install but auto_homedir is not even executed. Sorry but there must be some more steps?<br /><br />autofs is running and i have restarted it after changes.<br />online 16:44:51 svc:/system/filesystem/autofs:default<br /><br />auto master looks like this:<br />+auto_master<br />/net -hosts -nosuid,nobrowse<br />/home auto_home -nobrowse<br />/home /etc/auto_homedirRaivohttps://www.blogger.com/profile/11994434763285410624noreply@blogger.com