Anthony Lopez

“I’d rather see a sermon than hear one any day;”

Archive for the ‘Learning’ Category

Setting up VSFTP using non-local users.

Posted by lopeza on August 12, 2009

Install Required packages

pam
db4
vsftpd
compat-db (this is the package name on fedora which provides the binary db42_load)

Configure PAM

# vi /etc/pam.d/vsftpd (I EDITED THE FILE TO LOOK LIKE THIS)
#%PAM-1.0
session optional pam_keyinit.so force revoke
auth required /lib/security/pam_userdb.so db=/etc/vsftpd/vsftpd_users
account required /lib/security/pam_userdb.so db=/etc/vsftpd/vsftpd_users
#auth required pam_listfile.so item=user sense=deny file=/etc/vsftpd/ftpusers
#auth required pam_shells.so
#auth include system-auth
#account include system-auth
#session include system-auth
#session required pam_loginuid.so
(note: I had to comment out the bottom 6 lines to get the pam_userdb authentication to succeed for ftp logins. With them not commented out, authentication of known good users failed)

Create system user for vsftpd.conf (this is a dummy user, not logged into directly via FTP)
# adduser -d /home/virtualftp/ virtualftp

Configure vsftpd for virtual users

#vi /etc/vsftpd/vsftpd.conf (I EDITED THE FILE TO LOOK LIKE THIS)

local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_file=/var/log/vsftpd.log
xferlog_std_format=YES
chroot_local_user=YES
listen=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
# Virtual users will be logged into /home/virtualftp/[username]/
user_sub_token=$USER
local_root=/home/virtualftp/$USER
guest_enable=YES
guest_username=virtualftp
# Umask applied for virtual users and anon
anon_umask=0022
# Allows uploading by virtual users
anon_upload_enable=YES
# Allows creation of directories by virtual users
anon_mkdir_write_enable=YES
# Allows deletion of files and directories by virtual users
anon_other_write_enable=YES
# Sets a port range for passive mode. (must configure firewall to accept)
pasv_max_port=51123
pasv_min_port=51323
port_enable=YES

Setup virtual FTP usernames and their passwords (use the following format)

# vi /etc/vsftpd/vsftpd_users.txt

username1
passwordforusername1
username2
passwordforusername2
username3
passwordforusername3

Build the vsftpd database

#db42_load -T -t hash -f /etc/vsftpd/vsftpd_users.txt /etc/vsftpd/vsftpd_users.db
#chmod 600 /etc/vsftpd/vsftpd_users.db /etc/vsftpd/vsftpd_users.txt

Create directories for each virtual FTP user

#mkdir -p /home/virtualftp/username1

Test an FTP virtual user login

#ftp localhost
Connected to localhost.
220 (vsFTPd 2.0.5)
Name (localhost:root): username1
331 Please specify the password.
Password:
230 Login successful.

Advertisements

Posted in Learning, Linux | Leave a Comment »

SMART Method to meet objectives

Posted by lopeza on February 11, 2009

I formally learned this method at a scouting leadership training and have been using it ever since.  You can apply this method to almost anythnig you set out to accomplish.

Setting S.M.A.R.T. objectives

The objective setting process is a difficult one for most individuals, particularly those who’ve never been asked to set objectives. The process seems daunting. However, it doesn’t need to be. The process can be as simple as sitting down with the objectives and asking the question, “How can I best help to meet these objectives?” From that answer comes the core for setting the individual’s objectives. For example, if the objective is to improve the customer satisfaction score, the team can work on providing more self-service information to reduce the number of calls and call wait-time or offer tools to improve customer service levels by clarifying how to communicate with a customer.

The S.M.A.R.T. method is one way to help you remember how to walk through the process of setting your first MBO objectives.

  • S for Specific: There are several key factors which should be present in the objectives that are set in order for them to be effective. They should be specific. In other words, they should describe specifically the result that is desired. Instead of “better customer service score,” the objective should be “improve the customer service score by 12 points using the customer service survey.”
  • M for Measurable: The second example is much more specific and also addresses the second factor—measurable. In order to be able to use the objectives as a part of a review process it should be very clear whether the person met the objective or not.
  • A for Achievable: The next important factor to setting objectives is that they be achievable. For instance, an objective which states “100 percent customer satisfaction” isn’t realistically achievable. It’s not possible to expect that everyone must be 100 percent satisfied with their service. A goal of “12 percent  improvement in customer satisfaction” is better—but may still not be achievable if it’s assigned to the database developer. They aren’t likely to have enough influence over the customer interaction process to improve satisfaction by 12 percent.
  • R for Realistic: This leads into the next factor—realistic. Realistic objectives are objectives that recognize factors which can not be controlled. Said another way, realistic goals are potentially challenging but not so challenging that the chance of success is small. They can be accomplished with the tools that the person has at their disposal.
  • T for Time-based: The final factor for a good objective is that it is time-based. In other words, it’s not simply, “improve customer service by 12 percent,” it’s “improve customer service by 12 percent within the next 12 months.” This is the final anchor in making the objective real and tangible. This final factor is often implied in MBO setting. The implied date is the date of the next review, when the employee will be held accountable for the commitments that they’ve made through their objectives.

Posted in Learning | 1 Comment »