View previous topic :: View next topic |
Author |
Message |
nmap Tux's lil' helper


Joined: 28 Nov 2004 Posts: 122 Location: /dev/poznan/debiec
|
Posted: Sun Mar 20, 2005 4:50 pm Post subject: [SOLVED][OT]jak zmieniać hasło innym użytkownikom nie ... |
|
|
Witam mam server ok 100 osobników roznej toto maści
Chciał bym dac jednemu użytkownikowi prawo wydawania passwd na inne konta użytkowników po za samym root .
Męcze sie z tym i mecze ale ręce mi opadaja .
Próbowałem juz :
-grupy
-własny program + suid
-prawa manipulacje
I niestety po wileu godzinach pracy wymiekam
P.S oto programik :
Code: |
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char **argv) {
int wartosc;
char polecenie[128];
if (argc < 3) {
fprintf(stderr,"za mało parametrów!\n");
exit(1);
}
//strcpy (polecenie, "passwd ");
strcat(polecenie,argv[1]);
strcat(polecenie," ");
strcat(polecenie,argv[2]);
wartosc = execlp("ls",polecenie);
//printf("%s\n",polecenie);
}
|
_________________
FSF OpenBSD Open Source . You Have the Power !
Last edited by nmap on Sun Mar 20, 2005 7:06 pm; edited 1 time in total |
|
Back to top |
|
 |
efem n00b

Joined: 20 Mar 2005 Posts: 2
|
Posted: Sun Mar 20, 2005 5:49 pm Post subject: |
|
|
Czesc,
jezeli masz sudo to w sudoers (przez visudo) dopisz:
user_od_hasel ALL=/usr/bin/passwd [A-z], !/usr/bin/passwd root
Proste rozwiazania sa najlepsze.
Pozdrowiam
Maciek |
|
Back to top |
|
 |
nmap Tux's lil' helper


Joined: 28 Nov 2004 Posts: 122 Location: /dev/poznan/debiec
|
Posted: Sun Mar 20, 2005 7:05 pm Post subject: |
|
|
Dzieki za pomoc o ja głupi nie wpadłem na to . _________________
FSF OpenBSD Open Source . You Have the Power !
|
|
Back to top |
|
 |
|