Re: Account Creation and Password Change

Stephen Carville <[email protected]> Thu, 12 Jun 2003 11:00:31 -0700
Newsgroups gmane.linux.redhat.release.enigma
Organization Far Side of the Moon
Message-ID <[email protected]>
On Thursday June 12 2003 07:21 pm, Faisal Ashraf wrote:
> Hi,
>
> I want to give useradd and password change rights to one user I can't
> use sudo as it's required for our software which creates mail account
> through web.
>
> Is it possible to create an account with useradd and passswd change
> permission ?

No but you can accompilsh this with a little bit of hoop jumping.

Create a special group for the account creator -- call it eg "accmaker".

Next create a program -- Perl, C, whatever is most comfortable to you -- that 
accepts the minimum of information off the comand line.  Be sure the program 
checks that user input is appropiate.

Give owership to root:accmaker.

Set perms to r_sr_x___  That's read and execute for root and suid root.  Read 
and write for accmaker.  Nothing for anyone else.  (4550) Do _not_ let users 
have write access or they will be able to edit the file.  It is suid root and 
can be security hole. You have been warned

Put the user(s) who need to run the program in the accmaker group.

> And Thanks Florian La Roche I really forgot about /etc/hosts file :D
>
> Faisal
>
>
> _______________________________________________
> enigma-list mailing list
> [email protected]
> https://www.redhat.com/mailman/listinfo/enigma-list

-- 
Stephen Carville http://www.heronforge.net/~stephen/gnupgkey.txt