<div dir="ltr">HI<div><br></div><div>i tried both method and still it's not creating the home directories </div><div><br></div><div>regards,</div><div>Ben</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 11, 2015 at 11:35 PM, sipazzo <span dir="ltr"><<a href="mailto:sipazzo@yahoo.com" target="_blank">sipazzo@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:#000;background-color:#fff;font-family:bookman old style,new york,times,serif;font-size:13px"><div><span></span></div><div>This is how use the automounter to automatically create home directories for ipa users under /export/home/ and mount them under /home/ on Solaris 10, as well as copy over the profile files and assign appropriate owner and group:</div><div><br></div><div dir="ltr">We first created a service account called "auth" in ipa to allow ldap lookups with no password expiration<br></div><div><br></div><div dir="ltr">On the clients create a "mkhomedir" script in /usr/local/adm (or where ever you like):</div><div dir="ltr">#!/bin/ksh -p<br><br>HOMEDIRPATH=/home<br><br>PHYSICALDIRPATH=/export/home<br><br>hdir=~$1<br><br>phdir="$PHYSICALDIRPATH/$1"<br><br>if [ -d "$phdir" ]; then<br>        echo "localhost:$phdir"<br>        exit<br>fi<br><br>mkdir -p $phdir<br><br>#Perform ldap lookup to get user and group of logged in user <br></div><div dir="ltr">GID=`ldapsearch -h <a href="http://idmserver.example.com" target="_blank">idmserver.example.com</a> -D "uid=auth,cn=users,cn=accounts,dc=example,d<br>c=com" -w 'authpassword' -b "cn=users,cn=accounts,dc=example,dc=com" "(uid=$1)"<br> | grep gid | cut -d " " -f2`<br><br>#Copy profile files</div><div dir="ltr">cp /etc/skel/.bash_profile $phdir/.bash_profile<br>cp /etc/skel/.bashrc $phdir/.bashrc<br>cp /etc/skel/.profile $phdir/.profile<br>cp /etc/skel/.vimrc $phdir/.vimrc<br><br>#Change the owner and group to logged in user<br></div><div dir="ltr">chown -R "$1":"$GID" $phdir<br><br>echo "localhost:$phdir"</div><div dir="ltr"><br></div><div dir="ltr">######END########</div><div dir="ltr"><br></div><div dir="ltr">You need to change permissions on the "mkhomedir" script to 755<br></div><div dir="ltr"><br></div><br><div dir="ltr">Login to client directly as root so you can move home directories around (edit /etc/ssh/sshd_config if needed to allow this)<br></div><div dir="ltr"><br></div><div dir="ltr">Ensure no one else is logged in<br></div><div>Ensure nothing else is mounted in /export/home</div><div><span>Copy home directories to /export/home </span><strong></strong><br></div><div>rsync -av /home/ /export/home/</div><div><br></div><div dir="ltr">Add this line to the /etc/auto_master file so the "mkhomedir" script runs at login<br></div><div dir="ltr">/home           /usr/local/adm/mkhomedir</div><div dir="ltr"><br></div><div dir="ltr">Remove original /home/ directories<br></div><div dir="ltr">rm -rf /home/*</div><div dir="ltr"><br></div><div><span>Restart autofs</span> so the change takes effect<br></div><div>svcadm restart autofs</div><div><br></div><div dir="ltr">Make sure you change your sshd_config back if you don't wish to allow root ssh access.<br></div><div style="font-family:bookman old style,new york,times,serif;font-size:13px"> <div style="font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:16px"> <div> <hr size="1"><font face="Arial"><b><span style="font-weight:bold"></span></b></font><div><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <a href="mailto:freeipa-users-bounces@redhat.com" target="_blank">freeipa-users-bounces@redhat.com</a> [mailto:<a href="mailto:freeipa-users-bounces@redhat.com" target="_blank">freeipa-users-bounces@redhat.com</a>] <b>On Behalf Of </b>Ben .T.George<br><b>Sent:</b> Wednesday, March 11, 2015 11:22 AM<br><b>To:</b> dpal<br><b>Cc:</b> freeipa-users<br><b>Subject:</b> Re: [Freeipa-users] how can i create home directories automatically on solaris while IPA user login</span></div><span class=""><div>  </div><div><div>from BZ</div><div><div>  </div></div><div><div>"<span style="color:black">While we value your interest in IPA Solaris support, the implementation of the DUA profile is not on our nearest schedule at the moment. We lack both knowledge and resources to focus on integration with Solaris. This is where we need a help (ideally patches) and contribution from the community to help us push these features in.</span></div></div><pre style="white-space:pre-wrap;word-wrap:break-word"><span style="color:black">I checked your example DUAConfigProfile and I think it cannot be just added to FreeIPA right away. E.g. for defaultServerList or preferredServerList, you would need to expand installers and ipa-replica-manage to handle these lists and update them when replica is added or updated to prevent it being outdated. printers or aliases serviceSearchDescriptor refers to objects not being available and so on. It is not as straightforward as it seems.</span></pre><pre><span style="color:black">  </span></pre><pre><span style="color:black">What I think that we can work on is to work together on</span></pre><pre><span style="color:black"><a rel="nofollow" href="http://docs.fedoraproject.org/en-US/Fedora/18/html/FreeIPA_Guide/Configuring_an_IPA_Client_on_Solaris.html#Configuring_an_IPA_Client_on_Solaris_10" target="_blank"><span style="color:#0066cc">http://docs.fedoraproject.org/en-US/Fedora/18/html/FreeIPA_Guide/Configuring_an_IPA_Client_on_Solaris.html#Configuring_an_IPA_Client_on_Solaris_10</span></a></span></pre><pre><span style="color:black">... and add all the steps needed to make IPA work on Solaris 10. I could for example prepare an updated page and you could review it. Would that work for you?"</span></pre><pre style="white-space:pre-wrap;word-wrap:break-word"><span style="color:black">  </span></pre><pre style="white-space:pre-wrap;word-wrap:break-word"><span style="color:black">this what i followed util now. but's not authenticate with AD, IPA user can login on solaris box</span></pre><pre style="white-space:pre-wrap;word-wrap:break-word"><span style="color:black">  </span></pre><pre style="white-space:pre-wrap;word-wrap:break-word"><span style="color:black">  </span></pre></div></span><div><div>  </div><div><span class=""><div>On Wed, Mar 11, 2015 at 9:11 PM, Dmitri Pal <<a rel="nofollow" href="mailto:dpal@redhat.com" target="_blank">dpal@redhat.com</a>> wrote:</div></span><div><span class=""><div><div>On 03/11/2015 01:56 PM, Ben .T.George wrote:</div></div><blockquote style="margin-top:5.0pt;margin-bottom:5.0pt"><div><div>HI </div><div><div>  </div></div><div><div>yea , i saw that mail thread and he claims that he achieved somehow. but not clear.</div></div><div><div>  </div></div><div><div>and the  steps mentioned is too technical for me. :) as i am very new to IPA it's bit confusing. </div></div><div><div>  </div></div><div><div>later that thread also closed without proper explanation. </div></div><div><div>  </div></div><div><div>i think you guys can contact him to change existing wiki :) as there are many solaris related documents which is pretty old.</div></div><div><div>  </div></div><div><div>anyway still waiting for rply</div></div></div></blockquote><div><br>Have you found the BZ? They are very detailed.<br><a rel="nofollow" href="https://bugzilla.redhat.com/show_bug.cgi?id=815515" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=815515</a><br>The DUA profile is attached to the bug.</div></span><div><div><div><br><br><br></div><div><div><div>  </div></div><div><div>Regards,</div></div><div><div>Ben</div></div></div><div><div>  </div><div><span class=""><div>On Wed, Mar 11, 2015 at 8:49 PM, Dmitri Pal <<a rel="nofollow" href="mailto:dpal@redhat.com" target="_blank">dpal@redhat.com</a>> wrote:</div></span><div><span class=""><div><div>On 03/11/2015 01:18 PM, Ben .T.George wrote:</div></div><blockquote style="margin-top:5.0pt;margin-bottom:5.0pt"><div><div>HI  </div><div><div>  </div></div><div><div>thanks for the rply.</div></div><div><div>  </div></div><div><div>even i tried native auto_master file with directory checking script. if i feed the user manually to the script, the directory is creating and while login request comes, it didn't.</div></div><div><div>  </div></div><div><div>i don't think no one did full solaris integration util now as i asked many questions related to that.</div></div><div><div>  </div></div><div><div>now i am little bit confident up to this level. and if everything is working fine, i will try to create automated script for IPA join</div></div></div></blockquote></span><div><br><span class="">I really do not know Solaris that well. There are some threads from this and last week about Solaris. You can find them in the mail archive for March.<br>There are pointers to wikis and bugzillas in those threads. The bugzilla bugs have some extended info on how to configure Solaris clients. They were pretty detailed. May be they have the automount info you are looking for. </span></div><div><div><div><br><br><br></div><div><div><div>  </div></div><div><div>Regards,</div></div><div><div>Ben</div></div><div><div>  </div></div><div><div>  </div></div></div><div><div>  </div><div><span class=""><div>On Wed, Mar 11, 2015 at 7:32 PM, Dmitri Pal <<a rel="nofollow" href="mailto:dpal@redhat.com" target="_blank">dpal@redhat.com</a>> wrote:</div><div><div><div>On 03/11/2015 09:50 AM, Ben .T.George wrote:</div></div><blockquote style="margin-top:5.0pt;margin-bottom:5.0pt"><div><div>HI </div><div><div>  </div></div><div><div>i can able to reach upto level that IPA user can able to login on solaris box,</div></div><div><div>  </div></div><div><div>but how can i create home directories automatically on solaris while IPA user login.</div></div><div><div>  </div></div><div><div>even i change the shell in IPA web interface that is getting affected. i saw some option in IPA 3.3 web interface like automount and that is not in IPA 4.1.2 </div></div></div></blockquote><div><br>All the options are still there. The menus got re-arranged a bit.<br>Hopefully someone with a Solaris knowledge will help you with the rest.<br><br><br></div><div><div><div>  </div></div><div><div>please anyone tell me where it is and how can i achieve this</div></div><div><div>  </div></div><div><div>regards,</div></div><div><div>Ben</div></div></div><div style="margin-bottom:12.0pt">  </div><div><br><br><br><span style="color:#888888"></span></div><pre><span style="color:#888888">-- </span></pre><pre><span style="color:#888888">Thank you,</span></pre><pre><span style="color:#888888">Dmitri Pal</span></pre><pre><span style="color:#888888">  </span></pre><pre><span style="color:#888888">Sr. Engineering Manager IdM portfolio</span></pre><pre><span style="color:#888888">Red Hat, Inc.</span></pre></div></span><div><br><span class="">--<br>Manage your subscription for the Freeipa-users mailing list:<br><a rel="nofollow" href="https://www.redhat.com/mailman/listinfo/freeipa-users" target="_blank">https://www.redhat.com/mailman/listinfo/freeipa-users</a><br>Go to <a rel="nofollow" href="http://freeipa.org/" target="_blank">http://freeipa.org</a> for more info on the project</span></div></div><div>  </div></div><div><br><br><br></div><span class=""><pre>-- </pre><pre>Thank you,</pre><pre>Dmitri Pal</pre><pre>  </pre><pre>Sr. Engineering Manager IdM portfolio</pre><pre>Red Hat, Inc.</pre></span></div></div></div></div><div>  </div></div><span class=""><div><br><br><br></div><pre>-- </pre><pre>Thank you,</pre><pre>Dmitri Pal</pre><pre>  </pre><pre>Sr. Engineering Manager IdM portfolio</pre><pre>Red Hat, Inc.</pre></span></div></div></div></div><div>  </div></div></div><div><br><br></div> </div> </div>  </div></div></blockquote></div><br></div>