Security

Reply
MVP Expert

Defining unique visitor name in cppm guest

In Clearpass guest/Configuratino/Forms/mac_create there is a field called Visitor name

 

1). If I want to have the visitor name= mac address entered in the mac address field automatially, how do I do this so that the user only enters the mac-address

 

2). If I wanted the visitor nam = <userid of logged in user>-<mac address entered in mac address field> . can you do this autpomatically?

 

MVP Guru

Re: Defining unique visitor name in cppm guest

Possibly possible. :)

Can I ask why do you want to do this?

Cheers
James
----------------------------------------------------------------------
--------------------------@whereisjrw--------------------------
---------------------------------blog-------------------------------
ACCX #540 | ACMX #353 | ACDX #216 | AMFX #11
----------------------------------------------------------------------
----------------------------------------------------------------------

If a reply adequately addresses your issue, please click on the "Accept as Solution" and "Give Kudos" button so this information can benefit other users via search.
MVP Expert

Re: Defining unique visitor name in cppm guest

First I have to say its not my idea ... as to why if I started saying why it would probably end up being a bit of a rant. Suffice to say other people think its a good idea :-(

MVP Guru

Re: Defining unique visitor name in cppm guest

Ah ok. I've had a look at doing this and it seems mostly possible with javascript but it looks like a bit of a hack so I wouldn't really recommend it.

There's may be another way to do this but I'm not aware of it.

I assume you know that the current logged in user is the sponsor for any device s that they add. You can add the sponsor field to the device list view (/guest/mac_list.php) so you can see who the devices belong to.

Also you could just remove the device name so they don't have the extra field to fill in however it's handy to have the name as most people can't differentiate their PS4 and their Sonos via mac address. ;)

Cheers
James
----------------------------------------------------------------------
--------------------------@whereisjrw--------------------------
---------------------------------blog-------------------------------
ACCX #540 | ACMX #353 | ACDX #216 | AMFX #11
----------------------------------------------------------------------
----------------------------------------------------------------------

If a reply adequately addresses your issue, please click on the "Accept as Solution" and "Give Kudos" button so this information can benefit other users via search.
Highlighted
MVP Expert

Re: Defining unique visitor name in cppm guest

>Ah ok. I've had a look at doing this and it seems mostly possible with >javascript but it looks like a bit of a hack so I wouldn't really recommend it.

>There's may be another way to do this but I'm not aware of it.
ok.
>I assume you know that the current logged in user is the sponsor for any >device s that they add. You can add the sponsor field to the device list >view (/guest/mac_list.php) so you can see who the devices belong to.
Yup know that ...


>Also you could just remove the device name so they don't have the extra >field to fill in however it's handy to have the name as most people can't >differentiate their PS4 and their Sonos via mac address. ;)

Yup, my version of the page says enter device name of the form userid-<devicetype>, and yes mac addressses are'nt that useful for end users

Occasional Contributor II

Re: Defining unique visitor name in cppm guest

I'll not go into the office politics too much but the thinking behind this was to standardise on a device name in the format of userid-mac or userid-devicetype for all registered devices with the possibility of using this field as an attribute to do things in the future.  We decided that userid-mac would be good as it would be unique to every device. 

 

As we know most people won't read the fine detail of the webpage it's most likely we'll just get free text entered (unless we do some sort of validation check). If we do the validation check, users will get frustrated trying to enter the right format and end up calling the support office for help which defeats the purpose of self registration.

 

The idea is to keep the registration process as simple as possible for the end user (the current solution is to enter mac address and device type), so my feeling is either to remove it or let the user enter free text and accept that we can't use the field as an attribute to decide what we do with a device.

Re: Defining unique visitor name in cppm guest


@alexsuoy wrote:

In Clearpass guest/Configuratino/Forms/mac_create there is a field called Visitor name

 

1). If I want to have the visitor name= mac address entered in the mac address field automatially, how do I do this so that the user only enters the mac-address

 

2). If I wanted the visitor nam = <userid of logged in user>-<mac address entered in mac address field> . can you do this autpomatically?

 


Both are possible. You can use one of the following Java Scripts.

 

1. Populate mac address to visitor name field.

 

<script type="text/JavaScript"><!--{literal}
function RegisterSubmit(mac_create) {
var frm = document.forms[mac_create];

 

if (frm.mac.value != '') {
var temp1= frm.mac.value;
frm.visitor_name.value=temp1;
}
return true; // Proceed to regular
}
{/literal}</script>

 

2. Populate logged in user + mac address to visitor_name

 

<script type="text/JavaScript"><!--{literal}
function RegisterSubmit(mac_create) {
var frm = document.forms[mac_create];

if (frm.sponsor_name.value != '') {
var temp1= frm.sponsor_name.value;
var temp2= frm.mac.value;
frm.visitor_name.value=temp1 + " - " + temp2;
}
return true; // Proceed to regular
}
{/literal}</script>

 

Notes:

  • You may need to replace the "mac_create"  in the above script with the correct form name, if you are not using the default mac_create form for device resgistration.
  • Paste the above script in the form footer, Form > Edit > Footer HTML.
  • Edit the Form fields > submit > Show Advanced Porperties > AJAZ Submit and enter "RegisterSubmit". 

You can modify the fields in the script as needed. Keep the sponsor_name and visitor_name field interface type to hidden when using the script #2, sponsor_name filed interface can be static text too.

 

You may also refer the below article, if you have any assisatnce on how to use the script.

http://community.arubanetworks.com/t5/AAA-NAC-Guest-Access-BYOD/How-to-restrict-email-sponsor-email-field-in-guest-self/ta-p/215039

 


Thank you,
Saravanan Rajagopal

**Did something you read in the Community solve a problem for you? If so, click "Accept as Solution" in the post.

NOTE: Answers and views expressed by me on this forum are my own and not necessarily the position of Aruba or Hewlett Packard Enterprise.
Search Airheads
cancel
Showing results for 
Search instead for 
Did you mean: