IMHO.WS

IMHO.WS (http://www.imho.ws/index.php)
-   Пингвинятник (ОС *NIX) (http://www.imho.ws/forumdisplay.php?f=76)
-   -   Перенос юзверей. (http://www.imho.ws/showthread.php?t=55111)

MoHaX 29.03.2004 12:35

Перенос юзверей.
 
Есть фрюха 4.4 на ней почтовик и куча юзверей.... И есть новый сервак и на нём фрюха 4.9... Можно ли перенести всех юзверей с сохранением паролей и домашних директорий из одной фрюхи в другую? И как это сделать.....

biggyL 30.03.2004 18:30

Я заметил что люди просматривают эту тему но никто не отвечает, хотя проблема довольно актуальная, особенно когда переходишь на новую версию дистра.
Есть ли лёгкий путь перенести юзверей и их домашние директории? Видимо народ не очень компетентен в этом деле и никто нихочет чтоб по их совету MoHaX напортачил.
Вот чего я накопал тут - http://searchenterpriselinux.techtar...937444,00.html

Let's face it: We are stuck with users and new computers, and that means that eventually we'll have to move users' home directories to new disks or machines. You may not have had to do this yet, or you might have done it and had problems. In either case, here are the primary issues to which you must pay attention.

You either must (or should) preserve:

User and group ID (ownership);
Permissions;
Date and time stamps
for all objects.

The user and group owner names that show up in an "ls -l" are not stored with objects (files and directories). Only the UID and GID numbers are stored in the VTOCE block on disk. The "ls" command looks up these numbers and reports the matching names from the passwd and group databases (e.g., whatever technique you are using: files, nis, etc.).

If the users' files are moving onto a machine that uses the same databases (e.g., is within the NIS domain, on the same server, etc.), then all you must do is preserve the object's ownership.

If you're moving the user to a machine using a different password/group database, things are more complex. In this situation, you must either create a new user and group on the new machine with the same UID/GID numbers, or change the numbers on all files to whatever you give the new account (chown -R UID:GID). What you do will probably depend on whether the user's UID is already in use on the new machine. To find a user's UID/GID, either issue the "ID" command when logged in as that user, or look the username up in the passwd database.

When adding a new user, most LINUX systems have some variety of "useradd" or "userconf," which will allow you to specify the UID and GID to be used.

When you do the actual move of the files, be sure to use the correct options to preserve permissions and date/time stamps. Most commands accept options to the "restore" part of the command for this purpose (tar has "-p," pax has "e," unzip has "-X," etc.).

Losing date and time stamps is mostly a nuisance, but losing permissions can cause both security and application problems.

Добавлено через 17 минут:
если перенести на новую машину но на другой дистр:

/etc/passwd
/etc/shadow
/etc/group
/home/*

интересно будет ли пахать?

Bek 31.03.2004 12:24

biggyL
для этого и рекомендуется под рут и /home выделять отдельную партицию. Чтоб не переносить.

Цитата:

/etc/passwd
/etc/shadow
/etc/group
passwd и group достаточно для сопоставления ID символьным именам. Что тут сложного-то?
Может возникнуть проблема, если измениться механизм генерации пароля. тогда в shadow перезадать все пароли.

noname 31.03.2004 18:13

да не, я так понял что здесь ответили http://www.opennet.ru/openforum/vslu...ID1/42251.html

filonovd 02.04.2004 09:39

базы паролей (passwd, master.passwd, group) между версиями 4.4 и 4.9 не менялись.
Так, что скопировать, pwd_mkdb, и потом rsync -av -e ssh old:/home /home

MoHaX 02.04.2004 12:28

А чего делать с почтой? На 4.4 стоял Senmail на 4.9 Postfix... Создадуться ли заново почтовые очереди?

filonovd 03.04.2004 23:49

не понял вопроса. какие очереди? сконфигурь постфикса, перенеси ящики со старой машины, и радуйся жизни.

MoHaX 05.04.2004 12:49

Всё понял. спасибо..... :yees:


Часовой пояс GMT +4, время: 10:37.

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.