Archive for the tag 'Accounts'

Cannot use SSH with old system accounts after Installation of DirectAdmin

For all SSH accounts created with DirectAdmin, it adds the “AllowUsers” option to the /etc/ssh/sshd_config file.

When DirectAdmin is installed, it will add “root” and “admin” to that file under the AllowUsers option.

Any other users who have had SSH account on the system will also require to be added to that file in order to access the server via SSH.

Source: http://directadmin.com

Script to enable SpamAssassin for new accounts

By default (if enabled), DA gives the User the option to enable spamassassin, but it is not turned on by default.

The above script can be used to also enable spamassassin for all existing accounts. You can create another simple script to do it called (for example) spam.sh with the following code:

#!/bin/sh
for i in `ls /usr/local/directadmin/data/users`; do
{
username=$i spam=ON /usr/local/directadmin/scripts/custom/user_create_post.sh
};
done;
exit 0;

Save this new spam.sh script, chmod it to 755, and run it once.

Transferring User Accounts, Domain Names and Web Sites to Plesk Panel

You can transfer data (user accounts, settings, Web sites and e-mail) to your Parallels Plesk Panel from other hosting servers managed by earlier versions of Parallels Plesk Panel or other Web hosting software.

Data transfers from Windows-based servers to Linux/Unix-based servers are not supported by the Migration Manager function available from the Parallels Plesk Panel; however, you can transfer data from a Windows-based server to a Linux/Unix-based server by backing up data on a source server and then restoring them on the destination server using the command line backup and restore utilities.

Go to Home > Migration Manager (in the Help & Support group).
To check if there are any updates for Migration Manager components, click Synchronize. These updates may include files of migration agents that enable support for transferring data from hosting platforms other than Parallels Plesk Panel.

Click Start New Migration.
Leave the Transfer data from another server option selected, and specify the following options:

The source server’s address. Specify either the IP address or the host name of the server, from which you want to transfer data.
The login name and password used for logging in to the source server.

Select the type of operating system running on the source host. (This option is available if you are using Parallels Plesk Panel 9 for Windows hosting platform.)
Specify the path to the directory where temporary files will be stored.

Specify whether you want to transfer all data related to user accounts and domains from the source server, or only specific items.

Select the data compression option, if you pay per the amount of transferred data, or if you want to save bandwidth. Data compression saves bandwidth, but consumes more disk space.
Click Next>>. The migration manager will connect to the specified server and gather information about the business objects of the source hosting platform.

If you are transferring data from hosting platforms other than Parallels Plesk Panel, select the version of the migration agent that must be used and then click Next >>. Parallels Plesk Panel automatically selects the appropriate agent version; however, if data transfer fails, you can try selecting another version of migration agent.

Source : parallels.com/Plesk/

Simplifying Setup of User Accounts in Plesk

Before you start signing up new users for your services, you should create account configuration presets, referred to as reseller account templates and client account templates. They will simplify setting up user accounts for new customers. The templates cover all resource usage allotments, permissions and limits that you can define for a user account. There are predefined reseller account and client account templates: You can modify them as required and use them, or you can create your own templates. The default templates cannot be removed.

To create a reseller account template:

1. Go to Resellers > Reseller Account Templates > Create Reseller Account Template.

Click OK to complete creation of a template.

During setup of a new reseller account, you will select the required template and the account will be created and allocated the resources you defined.

To create a client account template:

1. Go to Clients > Client Account Templates > Create Client Account Template.

Click OK to complete creation of a template.

During setup of a new user account, you will select the required template and the account will be created and allocated the resources you defined.

SB-Shibu

Checking for Unlocked Accounts

Checking for Unlocked Accounts

It is important that all system and vendor accounts that are not used for logins are locked.

To get a list of unlocked accounts on your system, you can check for accounts that do NOT have an encrypted password string starting with “!” or “*” in the /etc/shadow file. If you lock an account using passwd -l, it will put a ‘!!’ in front of the encrypted password, effectively disabling the password.

If you lock an account using usermod -L, it will put a ‘!’ in front of the encrypted password. Many system and shared accounts are usually locked by default by having a ‘*’ or ‘!!’ in the password field which renders the encrypted password into an invalid string.

~$ sudo egrep -v ‘.*:\*|:\!’ /etc/shadow | awk -F: ‘{print $1}’
root
buddies
nagios

Also make sure all accounts have a ‘x’ in the password field in /etc/passwd. The following command lists all accounts that do not have a ‘x’ in the password field:

# grep -v ‘:x:’ /etc/passwd

A ‘x’ in the password fields means that the password has been shadowed, i.e. the encrypted password has to be looked up in the /etc/shadow file. If the password field in /etc/passwd is empty, then the system will not lookup the shadow file and it will not prompt the user for a password at the login prompt.

All system or vendor accounts that are not being used by users, applications, by the system or by daemons should be removed from the system. You can use the following command to find out if there are any files owned by a specific account:

# find / -path /proc -prune -o -user [account] -ls

The -prune option in this example is used to skip the /proc filesystem. If you are sure that an account can be deleted, you can remove the account using the following command:

# userdel -r [account]