NASHVILLE, Tenn. – State lawmakers in country music’s capital have passed a groundbreaking measure that would make it a crime to use a friend’s login — even with permission — to listen to songs or watch movies from services such as Netflix or Rhapsody.

The bill, which has been signed by the governor, was pushed by recording industry officials to try to stop the loss of billions of dollars to illegal music sharing. They hope other states will follow.

The legislation was aimed at hackers and thieves who sell passwords in bulk, but its sponsors acknowledge it could be employed against people who use a friend’s or relative’s subscription.

While those who share their subscriptions with a spouse or other family members under the same roof almost certainly have nothing to fear, blatant offenders — say, college students who give their logins to everyone on their dormitory floor — could get in trouble.

“What becomes not legal is if you send your user name and password to all your friends so they can get free subscriptions,” said the bill’s House sponsor, Rep. Gerald McCormick.

Under the measure, download services that believe they are getting ripped off can go to law enforcement authorities and press charges.

The bill expands an existing law used to prosecute people who steal cable television or leave restaurants without paying for their meals. It adds “entertainment subscription service” to the list of services protected by the law.

Tennessee would become the first state to update its theft-of-cable laws for the 21st century and address the new trend toward Internet delivery of entertainment, according to the Recording Industry Association of America.

“I think it’s stupid,” college student Josh Merbitz, 20, said of the law. The music education major at Middle Tennessee State University watches Netflix movies online using the password of his friend’s father, with the father’s permission.