ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Michael Shigorin <mike@lic145.kiev.ua>
To: mandrake-russian@altlinux.ru
Subject: [mdk-re] Re: перенос пользователей
Date: Mon Apr  1 22:58:20 2002
Message-ID: <20020401184450.GX30925@lic145.kiev.ua> (raw)
In-Reply-To: <1017657410.20435.60.camel@alexey.wolf.ru>

On Mon, Apr 01, 2002 at 02:36:49PM +0400, alex wrote:
> > > Целуй день уйдет, однако.
> > Ой.  А скрипты отменили, что ли? :))
> Если с tcb_convert тогда может и не целый. А если без него я не
> понимаю алгоритма работы таких скриптов :(
Я обычно прохожу одну-две итерации вручную, потом бэкаплю объект
внимания и пишу строчку (порой длинную).  Если есть подозрение на
реюзабельность, выделяю мышом и сохраняю в ~/bin/some_scriptlet.sh

В данном случае стоит почитать какой bash_conspect или еще что от
textutils, а потом выполить что-то вроде

while read line; do что_то; done < old_shadow

Где что_то режет строку на кусочки (man cut) и, создавая каталоги
под /etc/tcb (перед этим проверяя, а нет ли уже такого), пишет в
них файлы с выгрызенными кусочками.

Насколько я понимаю, вполне прокатит и просто
user="`echo $line | cut -f1 -d:`"
echo $line > /etc/tcb/$user/shadow

Вообще эта задача должна решаться строго одной строчкой на awk
(тем более perl), но awk я пользую редко, а с перлом почему-то
не дружу :)

-- 
 ---- WBR, Michael Shigorin <mike@altlinux.ru>
  ------ http://visa.chem.univ.kiev.ua/~mike/



      reply	other threads:[~2002-04-01 22:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-01 11:12 [mdk-re] перенос пользователпользователей alex
2002-04-01 11:29 ` [mdk-re] Re: [mdk-re] переноспользователпользователе й cornet
2002-04-01 11:51   ` [mdk-re] Re: [mdk-re] переноспользователпол=D 8зователе й alex
2002-04-01 11:57     ` [mdk-re] Re: перенос пользователей Vyt
2002-04-01 13:29     ` [mdk-re] Re: =?koi8-r?Q?=D0=C5=D2=C5=CE=CF=D3=D0=CF=CC=D8=DA=CF=D7=C1=D4=C5=CC=D0=CF=CC=D 8=DA=CF=D7=C1=D4=C5=CC=C5=20=CA?= Michael Shigorin
2002-04-01 14:33       ` [mdk-re] Re: переноспользователпол=D 8зователе й alex
2002-04-01 22:58         ` Michael Shigorin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020401184450.GX30925@lic145.kiev.ua \
    --to=mike@lic145.kiev.ua \
    --cc=mandrake-russian@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git