SafeBox StateMachine implemented with Enums
Make fields immutable when possible

The setPass method is never used in the posted code.
As such, you can make the password field immutable:

private final String password;


Reuse Scanner

ACCEPT.askPassword will recreate the Scanner scan field from System.in every time it's called. This is unnecessary, it would be better to create the scanner only once.
That also means that you can make scan a final field.

Use boolean expressions directly

Instead of code like this:


if (res == false)
// ...

if (res == true)
// ...



Use boolean expressions directly like this:

if (!res)
// ...

if (res)
// ...


Do this everywhere where you used something == true or false.

Combine related if statements

In this code there are two conditions on the value of res:


if (res == false) 
    System.out.println("try number:" + safebox.counter);

if (safebox.counter == 3){

    safebox.state = SafeBox.PENELTY;                
}

if (res == true)
{
    safebox.state = SafeBox.SUCCESS;        
}



The code could be reorganized to make it clearer and to avoid one unnecessary condition:

if (safebox.counter == 3) {
    safebox.state = SafeBox.PENELTY;
}

if (res) {
    safebox.state = SafeBox.SUCCESS;
} else {
    System.out.println("try number:" + safebox.counter);
}


And since safebox.counter is only incremented in case of failure,
the penalty condition can be moved inside the else branch of the second if statement:

if (askPassword(safebox)) {
    safebox.state = SafeBox.SUCCESS;
} else {
    System.out.println("try number:" + safebox.counter);
    if (safebox.counter == 3) {
        safebox.state = SafeBox.PENELTY;
    }
}