Archive for the tag 'System'

SBDavid

System Default Values for useradd

System Default Values for useradd

The primary tool used to add new users to your Linux system is useradd. This command pro-
vides an easy way to create a new user account and set up the user’s HOME directory structure all at once. The useradd command uses a combination of system default values and command line parameters to define a user account.

To see the system default values used on your Linux distribution, enter the useradd command with the -D parameter.

root@dell:~# /usr/sbin/useradd -D
GROUP=100
HOME=/home
INACTIVE=-1
EXPIRE=
SHELL=/bin/sh
SKEL=/etc/skel
CREATE_MAIL_SPOOL=no

The -D parameter shows what defaults the useradd command uses.

BackupPC is a high-performance, enterprise-grade system for backing up Linux, WinXX and MacOSX PCs and laptops to a server’s disk. BackupPC is highly configurable and easy to install and maintain.

The first thing to do is to install the CentOS testing repo, along with the yum-priorities plugin.

# cd /etc/yum.repos.d
# wget http://dev.centos.org/centos/5/CentOS-Testing.repo
# yum install yum-priorities

If you have RPMForge’s repo installed, you’ll want to make sure all the CentOS Base items are priority 1, RPMForge’s items priority 2, and CentOS testing repo is priority 3.

Install BackupPC

Next, install the BackupPC RPM, Apache, and mod_perl. All the Perl dependencies will be collected automatically.

# yum –enablerepo=c5-testing install backuppc httpd mod_perl

Checking system default VM setting using sysctl

Some of the VM settings for the kernel can be changed using sysctl. Here is a listing of the default settings for a system on 2.6.27

root@dell:~# sysctl -a |grep vm
vm.overcommit_memory = 0
vm.panic_on_oom = 0
vm.oom_kill_allocating_task = 0
vm.oom_dump_tasks = 0
vm.overcommit_ratio = 50
vm.page-cluster = 3
vm.dirty_background_ratio = 10
vm.dirty_ratio = 40
vm.dirty_writeback_centisecs = 499
vm.dirty_expire_centisecs = 2999
vm.nr_pdflush_threads = 2
vm.swappiness = 60
vm.nr_hugepages = 0
vm.hugetlb_shm_group = 0
vm.hugepages_treat_as_movable = 0
vm.nr_overcommit_hugepages = 0
vm.lowmem_reserve_ratio = 256 32 32
vm.drop_caches = 0
vm.min_free_kbytes = 2033
vm.percpu_pagelist_fraction = 0
vm.max_map_count = 65536
vm.laptop_mode = 0
vm.block_dump = 0
vm.vfs_cache_pressure = 100
vm.legacy_va_layout = 0
vm.stat_interval = 1
vm.mmap_min_addr = 0
vm.vdso_enabled = 2
vm.highmem_is_dirtyable = 0

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

SBDavid

DirectAdmin Mail System Setup

Simple Rules to follow to setup a Mail System

Hostname must not match any domain that is being used on the system. Example, if you have a domain called domain.com and you want to recieve mail on user@domain.com, you must *not* set your hostname to domain.com. We recommend using server.domain.com instead. You must make sure that you add the A record for server.domain.com so that it resolves.

For DirectAdmin

- The hostname must be in the /etc/virtual/domains file.
- The hostname must *not* be in the /etc/virtual/domainowners file.
- The hostname must resolve. If not, add the required A records to the dns zone such that it does.
- The directory /etc/virtual/hostname must exist.. (eg: /etc/virtual/server.domain.com). It must not contain any files
- Any domains that you want to use for email (eg: domain.com) must be in both the /etc/virtual/domains file and the /etc/virtual/domainowners file. The directory /etc/virtual/domain.com must exist and the files /etc/virtual/domain.com/passwd and /etc/virtual/domain.com/aliases exist.

- File permissions for virtual pop inboxes should be (not applicable with Dovecot/Maildir):

/var/spool/virtual/domain.com 770 username:mail
/var/spool/virtual/domain.com/* 660 username:mail

- Make sure that your main server IP has a reverse lookup on it.

« Prev - Next »