Help - want to add users and passwds not as root.

Help - want to add users and passwds not as root.

Post by Nico Zigoura » Mon, 05 Apr 1999 05:00:00



Hi all:

I need your help desperately.  I am setting up a web site and I want to
have users be able to add themselves to my linux system through a web
page.  They should be able to add themselves as a user and set their
passwords.

I have tried many ways but all require that I am logged in as root to do

it.

Any help would be greatly appreciated.

I am new to Linux sys admin, so please stay simple.

Ideally I would like a Perl script.
Thanks a lot.

- Nico.

 
 
 

Help - want to add users and passwds not as root.

Post by Phil Howa » Mon, 05 Apr 1999 05:00:00



| I need your help desperately.  I am setting up a web site and I want to
| have users be able to add themselves to my linux system through a web
| page.  They should be able to add themselves as a user and set their
| passwords.
|
| I have tried many ways but all require that I am logged in as root to do
|
| it.
|
| Any help would be greatly appreciated.
|
| I am new to Linux sys admin, so please stay simple.
|
| Ideally I would like a Perl script.
| Thanks a lot.

The actual program that adds/changes/deletes users must run as root.  And it
must be able to verify that only the correct user is in fact requesting the
change.  This does sound like you need a CGI, but it also will need to run
with root privileges.  Doing that in any scripting language is unsafe.  Perl
may be able to, but I have heard about bugs in suidperl, so I wouldn't trust
it.

Maybe someone has written such a thing in C/C++ already.

--
Phil Howard           KA9WGN


 
 
 

Help - want to add users and passwds not as root.

Post by Elmo Reci » Mon, 05 Apr 1999 05:00:00




> | I need your help desperately.  I am setting up a web site and I want to
> | have users be able to add themselves to my linux system through a web
> | page.  They should be able to add themselves as a user and set their
> | passwords.

> Maybe someone has written such a thing in C/C++ already.

I wrote a similar program for SAMBA. It's a CGI C++ program that runs as nobody. Then an
admin program that run's in root's crontab every... say minute or so... It looks for a
special database file whose permissions are set to 0400, owned by root. And when the
cron job kicks up, it runs the smbpasswd command using the data in the file. However, it
WILL NOT change the user's password if his old one doesnt check out with what he said
his old password was.

But like i said... it was designed for SAMBA password. Prolly a few hours of hacking
some bad code (my boss needed it right away) and you can make it work for the regular
unix passwd.

> Phil Howard           KA9WGN


ps: phil ehhe, n2wog here! ;)

cheers,
elmo

--
"We're really missing you
 and you've only just gone
 You were punched, you fell, and
 you felt embarrassed
 My heart goes out to you
 So I offered love and it was not
 Required
 What else can I do?"
-Morrissey (Sunny)

  elmo.vcf
< 1K Download
 
 
 

Help - want to add users and passwds not as root.

Post by Bryan Hackne » Wed, 07 Apr 1999 04:00:00


Sorry, there just isn't any safe way to do this.

Your security is minimally compromised with such a CGI script
if this machine is on a private network. If it is on an internet,
it is a sitting duck. It is generally easier to get root if you
already have a user account. If anyone can give himself a regular
account, well, all bets are off.

Maybe you can use HTTP IDs and mail IDs rather that unix IDs. Most
if not all large IPSs manage mail and dialup accounts without resorting
to unix IDs.

After saying that, if you still insist on anonymous account management,
you can probably find a script. No suggestions there.

BH


> Hi all:

> I need your help desperately.  I am setting up a web site and I want to
> have users be able to add themselves to my linux system through a web
> page.  They should be able to add themselves as a user and set their
> passwords.

> I have tried many ways but all require that I am logged in as root to do

> it.

> Any help would be greatly appreciated.

> I am new to Linux sys admin, so please stay simple.

> Ideally I would like a Perl script.
> Thanks a lot.

> - Nico.

--
Bryan Hackney / BHC / bhackneyatexpress-news.net
*
 
 
 

1. Help - want to add users and passwds not as root.

Hi all:

I need your help desperately.  I am setting up a web site and I want to
have users be able to add themselves to my linux system through a web
page.  They should be able to add themselves as a user and set their
passwords.

I have tried many ways but all require that I am logged in as root to do
it.

Any help would be greatly appreciated.

I am new to Linux sys admin, so please stay simple.

Ideally I would like a Perl script.
Thanks a lot.

- Nico.

2. kpp dies with tcgetattr error

3. Redhat 6.0 and SB1000

4. Authentication Error in RH 7.3 , not accepting any user/passwds

5. Identifying/activating faster ATAxx modes (WAS kernel config tale of woe)

6. Need help with resetting NIS+ user passwds

7. shell environment variable.

8. Help with non-anonymous users via NIS passwds

9. Need help with NIS+, addding users, changing passwds, etc.

10. Add user that can add users?

11. Newbe, How do i log in as a USER and not ROOT...help