Q:  My company has a strict policy that employees must not share passwords or other security details with anyone. My manager often asks me to save time by logging in with his credentials, so that he does not have to approve my work separately. Clearly, this breaks the rules, but it also saves time and makes my team more productive. What is the ethical course of action?  

A: You're breaking the rules, but your heart is in the right place. How much do your intentions matter when deciding the right thing to do? 

Unfortunately for you and your boss, not much. You may have your employer's best interests in mind, but you need to follow policy, says ethics professor Robert Prentice, at the McCombs School of Business at the University of Texas in the US. 

Just because you think your company’s aims are best served by violating the policy on sharing passwords does not mean the higher-ups will see it that way.

“Stepping back, it should be clear that your employer has already weighed its competing interests in security and efficiency and come down on the side of security,” said Prentice by email.

Clearly management has decided that employees at your level should not have unfettered access to their corporate systems, judging that the risks aren’t worth the extra productivity, he says. That’s a logical decision: think of the risk a ‘rogue’ employee poses, such as Nick Leeson, the Barings Bank trader whose trades lost the bank more than a billion dollars and forced it into bankruptcy in 1995. 

Your supervisor might be under the influence of what behavioural ethicists call ‘self-serving bias’, choosing to make things easier for himself and justifying his actions by asserting the company is better off anyway, Prentice said. As for you, you’re just following orders, and you’re confident that you’re a good and honest person.

But here’s where the line is clear. Stop ignoring the rules! The two of you can try explaining the situation to the bosses, but if they don’t grant you an exception to the policy, Prentice said, you must end this practice of sharing your manager’s login.

“You should not be secretly flouting company policy just because you and your supervisor find compliance inconvenient,” he said. 

Work Ethic is a twice-monthly column on BBC Capital in which we consider the ethical and interpersonal dilemmas that workers face around the world. We welcome knotty questions from readers at workethic@bbc.com.

To comment on this story or anything else you have seen on BBC Capital, please head over to our Facebook page or message us on Twitter.