Apple Inc. AAPL, -3.17% said it plans additional steps to keep hackers out of user accounts, but denied that a lax attitude toward security had allowed intruders to post nude photos of celebrities on the Internet.

In his first interview on the subject, Apple Chief Executive Tim Cook said celebrities’ iCloud accounts were compromised when hackers correctly answered security questions to obtain their passwords, or when they were victimized by a phishing scam to obtain user IDs and passwords. He said none of the Apple IDs and passwords leaked from the company’s servers.