Как подключить Samba 3 сервер к домену Active Directory
Join Samba 3 to Your Active Directory Domain
Original: http://www.enterprisenetworkingplanet.com/netos/article.php/3487081
Original: http://www.enterprisenetworkingplanet.com/netos/article.php/3487081
Современные дистрибутивы Linux позволяют подключать сетевые диски компьютеров под управлением Windows через графический интерфейс. Но иногда удобнее выполнить команду в консоли.
Для Fedora это будет:
mount -t cifs //server/sharedfolder /mnt -odomain=LOCALDOMAIN,user=username
В некоторых других системах вместо «cifs» нужно указать «smbfs»:
mount -t smbfs //server/sharedfolder /mnt -odomain=LOCALDOMAIN,user=username
Эта команда подключит сетевой каталог sharedfolder на сервере server (\\server\sharedfolder) по адресу /mnt.
Выполнив затем команду «ls /mnt», вы должны увидеть содержимое сетевого каталога.
Для того, чтобы закрыть подключение, достаточно выполнить
umount /mnt
Команды mount и umount должны выполняться под пользователем root.
0 Introduction
This Guide will explain in easy steps how to setup your Linux server
working for Subversion repository access through SSH client access.
The svn+ssh:// protocol enables you to use SSH client access is throught
the password prompt or using public private keys validation.
No Public/private key generation is necessary to use the simplified
svn+ssh protocol, but it might be a good idea, so that you can avoid
password prompts all the time when using the SVN client access.
This guide assumes that you know how to setup SSH with public/private
keys on the server and on your client, and that you already have
installed Subversion on your Linux box.
Чтобы добавить пользователя в группу можно использовать команды useradd или usermod. Useradd создаст нового пользователя. Usermod модифицирует существующую запись, ее можно использовать для добавления существующего пользователя в группу.
Есть два типа групп – первичная и вторичная. Вся информация о пользователях сохраняется в файлах /etc/passwd,/etc/shadow и /etc/group.
Use useradd command to add new users to existing group (or create a new group and then add user). If group does not exist, create it. Syntax:
useradd -G {group-name} username
Create a new user called vivek and add it to group called developers. First login as a root user (make sure group developers exists), enter:
# grep developers /etc/group
Output:
developers:x:1124:
If you do not see any output then you need to add group developers using groupadd command:
# groupadd developers
Next, add a user called vivek to group developers:
# useradd -G developers vivek
Setup password for user vivek:
# passwd vivek
Ensure that user added properly to group developers:
# id vivekOutput:
uid=1122(vivek) gid=1125(vivek) groups=1125(vivek),1124(developers)
Please note that capital G (-G) option add user to a list of supplementary groups. Each group is separated from the next by a comma, with no intervening whitespace. For example, add user jerry to groups admins, ftp, www, and developers, enter:
# useradd -G admins,ftp,www,developers jerry
To add a user tony to group developers use following command:
# useradd -g developers tony
# id tony
uid=1123(tony) gid=1124(developers) groups=1124(developers)
Please note that small -g option add user to initial login group (primary group). The group name must exist. A group number must refer to an already existing group.
Add existing user tony to ftp supplementary/secondary group with usermod command using -a option ~ i.e. add the user to the supplemental group(s). Use only with -G option :
# usermod -a -G ftp tony
Change existing user tony primary group to www:
# usermod -g www tony
Ситуация следующая:
под VMWARE Server, запущенном на Intel Core2 Quad Q6600 с Windows XP Professional x64, работают несколько виртуальных машин.
В качестве Linux системы используется CentOS 5. И под этими системами время очень сильно отстает от реальной жизни. Настройка ntpd в такой ситуации не помогает.
В принципе, можно регулярно запускать ntpdate для коррекции времени. Но в моем случае время за 10 секунд отстает на 5 секунд. Не ежесекундно же синхронизироваться
Нашел описание ситуации от VMWARE.
Сначала дописал в /boot/grub/grub.conf в конце строки с kernel:
clock=pit nosmp noapic nolapic
По описанию это должно решить проблему как с отставанием, так и со спешкой. Время стало спешить за 1 минуту на 10 секунд. Дело в том, что у меня не установлены VMWARE Tools. Поэтому я воспользовался альтернативным вариантом:
clock=pmtmr nosmp noapic nolapic
Первый вариант отключал коррекцию пропущенных тактов ядром, второй включает улучшенный механизм коррекции.
После последней перезагрузки время практически не уходит. Теперь со спокойной душой запустил ntpd и все пошло как по маслу!
I want to share quick and specific instructions for the installation of the Postgres 8 database on Red Hat Enterprise Linux 5 / Centos 5. I am using Yum for this installation. To make sure that you have everything needed do:
yum list | grep postgre
and verify that you see:
postgresql.i386, postgresql-server.i386 and postgres-libs.i386 (i386 if on non-64 bit version)
Centos installation comes with postgresql-lib installed. If it does not, do:
yum install postgresql-libs
Now, the general installation. As root install postgres core:
yum install postgresql
Install postgres server:
yum install postgresql-server
Now create postgres user:
adduser postgres
Create the datafile for the database:
mkdir -p /usr/local/pgsql/data
Change ownership of the data files to the postgres user:
chown postgres /usr/local/pgsql/data
Now assume the role of a postgres user:
su - postgress
Important note: Installation of the postgres executables on Centos 5 / RHEL 5 is /usr/bin not /usr/local as Postgres official documentation suggests.
Initialize the datafiles for the database:
/usr/bin/initdb -D /usr/local/pgsql/data
Start the database with initialized datafiles as the background process ( & ) and log all messages and errors ( 2&1 ) in the logfile:
/usr/bin/postgres -D /usr/local/pgsql/data > logfile 2>&1 &
Create the test database:
/usr/bin/createdb test
Log in to the test database:
/usr/bin/psql test
You should see «Welcome to Postgres 8…» intro message and prompt:
test=#
# ifconfig eth0 down
# ifconfig eth0 hw ether 00:80:48:BA:d1:20
# ifconfig eth0 up
# ifconfig eth0 |grep HWaddr
Установить сервис:
# yum install ntp
Включить запуск сервиса:
# chkconfig ntpd on
Синхронизировать время с with 0.pool.ntp.org:
# ntpdate pool.ntp.org
Запустить NTP:
# /etc/init.d/ntpd start
Команда rm не принимает перенаправление ввода, поэтому rm < files-to-remove.txt работать не будет.
Можно использовать:
Аналогично можно удалить файлы, отобранные командой grep:
rm `ls | grep 123`
Сначала проверим установлненное имя компьютера. Это можно сделать следующими командами:
uname -n
hostname -a
hostname -s
hostname -d
hostname -f
hostname
Если перечисленные команды возвращают правильное значение без ошибок – все в порядке.
Читать дальше…