If is change it to the below snipper, using id -u to get the uid and
then give that to getentpasswd, it works.
The nobody user check doesn't work properly now though, all, it works on
RHEL4, not sure about other OS's...
------------
user=`id -u`
home=`getent passwd $user | awk -F: '{print $6}' | tail -1`
if [ "$user" == "99" ] ; then
echo Not creating SSH keys for user $user
elif [ `echo $home | wc -w` -ne 1 ] ; then
echo cannot determine home directory of user $user
else
---------------------
>>-----Original Message-----
>>From: [EMAIL PROTECTED]
>>[mailto:[EMAIL PROTECTED] On Behalf
>>Of Andre Verheij
>>Sent: Wednesday, March 26, 2008 8:13 AM
>>To: [email protected]
>>Subject: [Oscar-users] Bug ? In /etc/profile.d/ssh-oscar.sh
>>
>>Hi All,
>>
>>I have found an error in the /etc/profile.d/script that is
>>run then a user logs in to the hpcheadnode. It fails in my
>>case because the hpcheadnode (and my hpcnodes) are using
>>Ldap/krb auth to an Active directory and using autofs to
>>mount the homedir from a NFS box (which is not the hpcheadnode)
>>
>>I tested and the problem lies in the fact that the user logs in
>>(non-root) and the user is not able to do a getent passwd on
>>the ldap data in AD. Thus it can't find their own homedrive
>>to check for. They can login fine, because the homedir is
>>actually mounted (ssh-keyless entry works for example)
>>
>>---------
>>user=`whoami`
>>home=`getent passwd | egrep "^$user\:" | awk -F: '{print $6}'
>>| tail -1` if [ "$user" == "nobody" ] ; then
>> echo Not creating SSH keys for user $user elif [ `echo
>>$home | wc -w` -ne 1 ] ; then
>> ### Next line disabled, it is not correct in finding the homedir.
>> #echo cannot determine home directory of user $user
>> nohome=yes
>>Else
>>-----------------
>>Above is the little snippet from the script and how I have
>>disabled the check for now.
>>
>>Not sure if this is a bug, or an un supported config... Just
>>thought I'd share it.
>>
>>
>>ANDRE VERHEIJ | Network Services Manager
>>
>>FACULTY OF ECONOMICS AND BUSINESS
>>Faculty IT, Room 118
>>Economics and Business Building (H69)
>>The University of Sydney | NSW | 2006
>>
>>p 61 2 9351 3346| f 61 2 9351 4662
>>e [EMAIL PROTECTED] | w www.econ.usyd.edu.au/it
>>
>>
>>
>>
>>--------------------------------------------------------------
>>-----------
>>Check out the new SourceForge.net Marketplace.
>>It's the best place to buy or sell services for just about
>>anything Open Source.
>>http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.n
et/marketplace
>>_______________________________________________
>>Oscar-users mailing list
>>[email protected]
>>https://lists.sourceforge.net/lists/listinfo/oscar-users
>>
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Oscar-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oscar-users