Friday, February 15, 2019

CentOS6 - FreeIPA/IdM does not support short name to login for AD users.


CentOS6 FreeIPA - short username login is not supported for AD users. Hence a workaround!

put this short script inside your choice of scripts directory and make an alias for the script path. You can have this alias globally available as the users will definitely like it!  Who wants to type 

ssh user@someaddomain.com@hostname.somedomain.com ?

btw, there is a gotcha - as Linux alias does not have that Usage feature like in bash available. you may want to let the users know on how to use the command. 


Myhost:~ cat ssh_con.sh

#!/bin/bash
HOSTNAME=$1
IDMUSER=user@somedomain.com
if [[ $1 = $HOSTNAME ]]; then
ssh $IDMUSER@$HOSTNAME
fi

alias sshcon='/Users/sangvikarr/test_con.sh'



Disclaimer: This is for my reference only. If you find it useful, use at your own risk.


No comments: