* [Comm] Добавление пользователя в группу
@ 2005-02-18 10:38 Olvin
2005-02-18 11:04 ` Mike Lykov
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Olvin @ 2005-02-18 10:38 UTC (permalink / raw)
To: community
Для сабжа в ALM2.4 сделал скриптики:
#!/bin/sh
#uatg
usermod -G `id $1 | ~/bin/uatg.pl $2` $1
#!/usr/bin/perl
#uatg.pl
$a=<STDIN>;
$a =~ s/\S+\s+\S+\s+//g;
$a =~ s/[^\=]+\=//g;
$a=~s/\d+\(//g;
$a=~s/\)//g;
$a=~s/[\n\r]+//g;
@A = split(/\,/,$a);
foreach $a(@A){
push(@B,$a);
}
push(@B,$ARGV[0]);
$,=','; print @B;
Думаю, что есть более прямой путь. Какой?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Comm] Добавление пользователя в группу
2005-02-18 10:38 [Comm] Добавление пользователя в группу Olvin
@ 2005-02-18 11:04 ` Mike Lykov
2005-02-18 11:05 ` Slava Dubrovskiy
2005-02-18 23:23 ` Dmitry V. Levin
2 siblings, 0 replies; 7+ messages in thread
From: Mike Lykov @ 2005-02-18 11:04 UTC (permalink / raw)
To: community
В сообщении от Пятница 18 Февраль 2005 14:38 Olvin написал:
> Для сабжа в ALM2.4 сделал скриптики:
> Думаю, что есть более прямой путь. Какой?
использовать groupkit?
--
Mike Lykov
Samara, "Vesna" parfum company, System administrator
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Comm] Добавление пользователя в группу
2005-02-18 10:38 [Comm] Добавление пользователя в группу Olvin
2005-02-18 11:04 ` Mike Lykov
@ 2005-02-18 11:05 ` Slava Dubrovskiy
2005-02-18 11:24 ` Olvin
2005-02-18 23:23 ` Dmitry V. Levin
2 siblings, 1 reply; 7+ messages in thread
From: Slava Dubrovskiy @ 2005-02-18 11:05 UTC (permalink / raw)
To: community
Olvin пишет:
> Для сабжа в ALM2.4 сделал скриптики:
>
> #!/bin/sh
> #uatg
> usermod -G `id $1 | ~/bin/uatg.pl $2` $1
>
> #!/usr/bin/perl
> #uatg.pl
> $a=<STDIN>;
> $a =~ s/\S+\s+\S+\s+//g;
> $a =~ s/[^\=]+\=//g;
> $a=~s/\d+\(//g;
> $a=~s/\)//g;
> $a=~s/[\n\r]+//g;
> @A = split(/\,/,$a);
> foreach $a(@A){
> push(@B,$a);
> }
> push(@B,$ARGV[0]);
> $,=','; print @B;
>
> Думаю, что есть более прямой путь. Какой?
>
Честно говоря не силен в перле. Как я понял это добавляет и удаляет
пользователя из группы? Если да, то я пользуюсь groupkit.
#apt-get install groupkit
#rpm -ql groupkit
/usr/sbin/addusertogroup
/usr/sbin/deluserfromgroup
--
С уважением,
Дубровский Вячеслав.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Comm] Добавление пользователя в группу
2005-02-18 11:05 ` Slava Dubrovskiy
@ 2005-02-18 11:24 ` Olvin
2005-02-18 12:06 ` Mike Lykov
0 siblings, 1 reply; 7+ messages in thread
From: Olvin @ 2005-02-18 11:24 UTC (permalink / raw)
To: community
Slava Dubrovskiy wrote:
>>Для сабжа в ALM2.4 сделал скриптики:
[skip]
>>Думаю, что есть более прямой путь. Какой?
> Честно говоря не силен в перле. Как я понял это добавляет и удаляет
> пользователя из группы? Если да, то я пользуюсь groupkit.
> #apt-get install groupkit
> #rpm -ql groupkit
> /usr/sbin/addusertogroup
> /usr/sbin/deluserfromgroup
Кажется, оно и есть. Только вот какого чёрта этого нет при стандартной
установке системы? Манипулирование составом групп - это же стандартная
операция. Одна из часто встречающихся...
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Comm] Добавление пользователя в группу
2005-02-18 11:24 ` Olvin
@ 2005-02-18 12:06 ` Mike Lykov
0 siblings, 0 replies; 7+ messages in thread
From: Mike Lykov @ 2005-02-18 12:06 UTC (permalink / raw)
To: community
В сообщении от Пятница 18 Февраль 2005 15:24 Olvin написал:
> Кажется, оно и есть. Только вот какого чёрта этого нет при стандартной
> установке системы? Манипулирование составом групп - это же стандартная
> операция. Одна из часто встречающихся...
Понятие "стандартная установка системы" очень расплывчато, в связи со
специфическим инсталлятором.
Ждите Master 3 с новым инсталлятором ;)
--
Mike Lykov
Samara, "Vesna" parfum company, System administrator
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Comm] Добавление пользователя в группу
2005-02-18 10:38 [Comm] Добавление пользователя в группу Olvin
2005-02-18 11:04 ` Mike Lykov
2005-02-18 11:05 ` Slava Dubrovskiy
@ 2005-02-18 23:23 ` Dmitry V. Levin
2005-02-23 15:45 ` [Comm] " Michael Shigorin
2 siblings, 1 reply; 7+ messages in thread
From: Dmitry V. Levin @ 2005-02-18 23:23 UTC (permalink / raw)
To: ALT Linux general discussion list
[-- Attachment #1: Type: text/plain, Size: 351 bytes --]
On Fri, Feb 18, 2005 at 12:38:19PM +0200, Olvin wrote:
> Для сабжа в ALM2.4 сделал скриптики:
>
> #!/bin/sh
> #uatg
> usermod -G `id $1 | ~/bin/uatg.pl $2` $1
>
> #!/usr/bin/perl
> #uatg.pl
[...]
>
> Думаю, что есть более прямой путь. Какой?
gpasswd(1) из пакета shadow-groups.
Не пора ли занести этот вопрос в FAQ?
--
ldv
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-02-23 15:45 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-18 10:38 [Comm] Добавление пользователя в группу Olvin
2005-02-18 11:04 ` Mike Lykov
2005-02-18 11:05 ` Slava Dubrovskiy
2005-02-18 11:24 ` Olvin
2005-02-18 12:06 ` Mike Lykov
2005-02-18 23:23 ` Dmitry V. Levin
2005-02-23 15:45 ` [Comm] " Michael Shigorin
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