BEIJING  News Web sites in China, complying with secret government orders, are requiring that new users log on under their true identities to post comments, a shift in policy that the country’s Internet users and media have fiercely opposed in the past.

Until recently, users could weigh in on news items on many of the affected sites more anonymously, often without registering at all, though the sites were obligated to screen all posts, and the posts could still be traced via Internet protocol addresses.

But in early August, without notification of a change, news portals like Sina, Netease, Sohu and scores of other sites began asking unregistered users to sign in under their real names and identification numbers, said top editors at two of the major portals affected. A Sina staff member also confirmed the change.

The editors said the sites were putting into effect a confidential directive issued in late July by the State Council Information Office, one of the main government bodies responsible for supervising the Internet in China.