Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED][OT]jak zmieniać hasło innym użytkownikom nie ...
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Polskie forum (Polish) Polish OTW
View previous topic :: View next topic  
Author Message
nmap
Tux's lil' helper
Tux's lil' helper


Joined: 28 Nov 2004
Posts: 122
Location: /dev/poznan/debiec

PostPosted: Sun Mar 20, 2005 4:50 pm    Post subject: [SOLVED][OT]jak zmieniać hasło innym użytkownikom nie ... Reply with quote

Witam mam server ok 100 osobników :D roznej toto maści :D
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 :D


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
View user's profile Send private message
efem
n00b
n00b


Joined: 20 Mar 2005
Posts: 2

PostPosted: Sun Mar 20, 2005 5:49 pm    Post subject: Reply with quote

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
View user's profile Send private message
nmap
Tux's lil' helper
Tux's lil' helper


Joined: 28 Nov 2004
Posts: 122
Location: /dev/poznan/debiec

PostPosted: Sun Mar 20, 2005 7:05 pm    Post subject: Reply with quote

Dzieki za pomoc o ja głupi nie wpadłem na to :D .
_________________

FSF OpenBSD Open Source . You Have the Power !
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Polskie forum (Polish) Polish OTW All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum