Class: Specinfra::Command::Freebsd::Base::User

Inherits:
Base::User show all
Defined in:
lib/specinfra/command/freebsd/base/user.rb

Direct Known Subclasses

V6::User

Class Method Summary collapse

Methods inherited from Base::User

add, check_belongs_to_group, check_belongs_to_primary_group, check_exists, check_has_authorized_key, check_has_home_directory, check_has_login_shell, check_has_uid, get_encrypted_password, get_gid, get_home_directory, get_login_shell, get_uid, update_encrypted_password, update_gid, update_home_directory, update_login_shell, update_uid

Methods inherited from Base

escape

Class Method Details

.createObject



3
4
5
6
7
8
9
# File 'lib/specinfra/command/freebsd/base/user.rb', line 3

def create
  if os[:release].to_i < 7
    Specinfra::Command::Freebsd::V6::User
  else
    self
  end
end

.get_maximum_days_between_password_change(user) ⇒ Object



15
16
17
# File 'lib/specinfra/command/freebsd/base/user.rb', line 15

def get_maximum_days_between_password_change(user)
  "pw usershow -n #{escape(user)} | cut -d':' -f 6"
end

.get_minimum_days_between_password_change(user) ⇒ Object



11
12
13
# File 'lib/specinfra/command/freebsd/base/user.rb', line 11

def get_minimum_days_between_password_change(user)
  "0"
end