29 F.3d 631
NOTICE: Ninth Circuit Rule 36-3 provides that dispositions other than opinions or orders designated for publication are not precedential and should not be cited except when relevant under the doctrines of law of the case, res judicata, or collateral estoppel.Johnnie COOPER, Jr., aka Bobby Smith, Plaintiff-Appellant,v.STATE OF WASHINGTON;  Daniel Kershner, Defendants-Appellees.
No. 94-35162.
United States Court of Appeals, Ninth Circuit.
Submitted June 21, 1994.*Decided July 6, 1994.

Before:  TANG, PREGERSON, and T.G. NELSON, Circuit Judges.


1
MEMORANDUM**


2
Johnnie Cooper, Jr., a Washington state prisoner, appeals pro se the district court's dismissal of his 42 U.S.C. Sec. 1983 action as frivolous, pursuant to 28 U.S.C. Sec. 1915(d).  Cooper contends that the defendants are liable under Sec. 1983 because the state court judge did not credit him with time served prior to trial and while in a drug rehabilitation program.  We have jurisdiction under 28 U.S.C. Sec. 1291.  We review for an abuse of discretion,  Denton v. Hernandez, 112 S.Ct. 1728, 1734 (1992), and affirm.


3
Frivolous in forma pauperis complaints may be dismissed sua sponte under 28 U.S.C. Sec. 1915(d).   Neitzke v. Williams, 490 U.S. 319, 324 (1989).  A complaint is frivolous "where it lacks an arguable basis either in law or in fact."   Id. at 325.


4
Neither the State of Washington nor Judge Kershner, the named defendants, may be sued under Sec. 1983 for damages because the state is not a person liable to suit under Sec. 1983, and the judge's actions in sentencing Cooper are within the scope of his official capacity.   See Will v. Michigan Dep't of State Police, 491 U.S. 58, 71 (1989) (state is not a person for purposes of Sec. 1983 liability);  Butz v. Economou, 438 U.S. 428 (1978) (judges acting within scope of judicial capacity are immune from suit for money damages under Sec. 1983).  Accordingly, the district court did not err by dismissing the complaint and action as frivolous.   See Neitzke, 490 U.S. at 325.1


5
AFFIRMED.



*
 The panel unanimously finds this case suitable for decision without oral argument.  Fed.R.App.P. 34(a);  9th Cir.R. 34-4


**
 This disposition is not appropriate for publication and may not be cited to or by the courts of this circuit except as provided by 9th Cir.R. 36-3


1
 The district court correctly noted that the action should be brought as a petition for habeas corpus after plaintiff exhausts his state remedies, because he challenges the manner of execution of his sentence


