On a RedHat 7, when I run the following command to get a Kerberos ticket:
krb my_user
It sends back :
Ticket for 'my_user' is valid until 08:36 (28/01)
Now I need to run this command from a script. Without changing directory, I create a ksh script with the following content:
#!/bin/ksh
krb my_user
When I execute the script, I have the following error:
./script.ksh[2]: krb: not found [No such file or directory]
I don't understand where this krb command is found when I execute it directly from command line.
The krb command is not in the aliases when I list them.
If I run a locate krb it doesn't return anything just called krb.
If I run which krb it says
/usr/bin/which: no krb in (/usr/java/default/bin:/bin:/usr/bin:/usr/local/bin:/bin)
What should I do to make this krb command work from my script?
type krb? Odds are it’s an alias or a function.type krbreturnskrb is a function krb () { .... So this is a function. Now I have to find out what a function is in Linux context. Thx @bxm.