Skip to main content

Posts

Showing posts from January, 2009

Rails migration for acts_as_authenticated plugin

The following shows a typical Rails migration for creating the users, roles and role_users table for the acts_as_authenticated plugin. Note that an initial admin user with a default password is added: class CreateRolesAndUsers < force =""> true do |t| t.column :login, :string t.column :email, :string t.column :crypted_password, :string, :limit => 40 t.column :salt, :string, :limit => 40 t.column :created_at, :datetime t.column :updated_at, :datetime t.column :remember_token, :string t.column :remember_token_expires_at, :datetime end create_table :roles, :force => true do |t| t.column :name, :string, :limit => 40 t.column :authorizable_type, :string, :limit => 30 #t.column :authorizable_id, :integer t.column :created_at, :datetime t.column :updated

Systems Management: A time saver

Systems Management in Rails is a rails application for keeping track of computer inventory and also allows the user to execute remote ssh commands, wake on LAN, vnc and remote desktop on them. I developed it to help distribute software to all the machines at my work in a easy way. It uses the OpenAudit database (populated of course by the OpenAudit scripts) with some added changes such a new column in the systems table for type of password and a new table to keep the ssh commands history. Software distribution is done this way: User specify which file to send to which machines and the command to be run when the upload is successful The file is uploaded using sftp The command is executed using SSH. Systems Management also allows the user to access a computer via VNC or RDP by just clicking on a link. You can download it from http://rubyforge.org/projects/managesystems/