JAMF Recon - Can't fill in Full Name and Real Name with properly spaced name!

diana
New Contributor II

c5818c1be31b49c99615131eb0297179
So we don't have LDAP and I want to fill in a User's name based on the Full Name of their login account. The issue becomes that I run the recon command and it takes spaces into account and only recons the first name. So then I thought I'd do two commands to determine first and last name and recon both of those together but I have no idea how to make a space between them. I'd prefer not to have a . separating first and last name.

What am I missing? :)

1 ACCEPTED SOLUTION

tthurman
Contributor III

@dianabirsan

If you put quotes around the two variables to make it an entire string, it'll submit properly.

firstName="John"
lastName="Smith"

sudo jamf recon -endUsername "$firstName $lastName"

EDIT
For kicks, you could also make one variable out of two. (If for some reason the binary didn't accept it the first way.

firstName="John"
lastName="Smith"
fullName="$firstName $lastName"

sudo jamf recon -endUsername $fullName

View solution in original post

2 REPLIES 2

tthurman
Contributor III

@dianabirsan

If you put quotes around the two variables to make it an entire string, it'll submit properly.

firstName="John"
lastName="Smith"

sudo jamf recon -endUsername "$firstName $lastName"

EDIT
For kicks, you could also make one variable out of two. (If for some reason the binary didn't accept it the first way.

firstName="John"
lastName="Smith"
fullName="$firstName $lastName"

sudo jamf recon -endUsername $fullName

diana
New Contributor II

Damn those "", things I don't know :) Thanks that solved it! Just doing one variable now and it works. Woohoo