just bought a house from auction, want to lease it out but i want to undestand more of the laws between tenant and landlord

Where can i get some good sources regarding the laws, codes, or regulations governing the responsibilities of the tenant and landlord? Like if a tenant moves out what will i be able to deduct from the security deposit.
For example, if the walls are dirty,sullied, scraped, or damaged am i within my right as a landlord to deduct repainting fees from the security deposit.

Please any advice will be helpful.

Hi Mike,
The security deposit is to be used for repairs of the property that are not covered under normal wear and tear. The Department of Consumer Affairs has a great website. http://www.dca.ca.gov/publications/landlordbook/index.shtml
You are smart to do your research in advance and make sure you understand the laws. Landlords can easily get into trouble if they take action when they do not understand the law.
Keep in mind that if you purchased a property in an area that has rent control (San Francisco & Berkeley to name a couple) you will want to make sure you completely understand the rent control laws!!