Add line, "switchport port-security maximum 4" to interface config.
! Before editing SmartPort config:
!
SWITCH#show run interf gig 1/0/3
Building configuration...
Current configuration : 340 bytes
!
interface GigabitEthernet1/0/4
description Rm. #, Jack "A"
switchport mode access
switchport port-security
switchport port-security aging time 2
switchport port-security violation restrict
switchport port-security aging type inactivity
macro description cisco-desktop
spanning-tree portfast
spanning-tree bpduguard enable
end
!
! With additional changes from online research
!
SWITCH#show run interf gig 1/0/3
Building configuration...
Current configuration : 377 bytes
!
interface GigabitEthernet1/0/3
description Rm. #, Jack "A"
switchport mode access'
switchport port-security maximum 4
switchport port-security
switchport port-security aging time 30
switchport port-security violation restrict
switchport port-security aging type inactivity
macro description cisco-desktop
spanning-tree portfast
spanning-tree bpduguard enable
end