Change node password

Deprecated. There is a better alternative form different points of view - please check SolusVM

Change node password

Postby lik » Tue Jan 12, 2010 3:47 pm

You can use this script to reset your node password: http://www.fluidvm.com/downloads/nodepassreset.txt
Code: Select all
import crypt
import os
import getpass

def set_node_password():
    while(1):
        pass1 = getpass.getpass()
        pass2 = getpass.getpass(prompt = 'Confirm Password: ')
        if pass1 != pass2:
            print 'The passwords you entered did not match! Please try again.'
        elif len(pass1) < 6:
            print 'Password length must be atleast 6 characters! Please try again.'
        else:
            break

    f=open('/etc/vkarma/passwd', 'w')
    f.write(crypt.crypt(pass1, 'BK'))
    f.close()
    os.chmod('/etc/vkarma/passwd', 0400)

if __name__ == '__main__':
    set_node_password()

Once you download it, please rename it to nodepassreset.py and run like this:
Code: Select all
wget http://www.fluidvm.com/downloads/nodepassreset.txt
mv nodepassreset.txt nodepassreset.py
python nodepassreset.py
lik
Founder
Founder
 
Posts: 497
Joined: Wed Dec 15, 2010 3:21 am

Return to FluidVM

 


  • Related topics
    Replies
    Views
    Last post
cron