#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2002
    Location
    India
    Posts
    7
    Rep Power
    0

    Unhappy Control Panel in c/c++, through web-based interface


    Hello All:
    I am trying to lean some of the basics of programming. I would like to make a web-based interface that coould manage virtually anything - right from managing user to chaging httpd configuration through a web-based interface.

    This is somewhat like Samba Swat and webmin. I am trying to learn the in-depth methods used in these programs.

    Please tell me as you would to a baby :D

    Thanks in advance

    VinayRas
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2002
    Location
    London
    Posts
    349
    Rep Power
    13
    OK 1st step go on a C++ course for 3 years.
    Come back and rephrase you question so that we all don't think your
    a) stupid for asking such a dumb question
    b) Lazy
    c) Trying to get us to do work for you
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2002
    Location
    India
    Posts
    7
    Rep Power
    0

    Where am i wrong?


    Hello
    How can you call my question as dumb?

    I simply dont know how to manage root task through a web-based interface, that usually have user permission of "nobody" or "apache" in case of Apache Web-Server.

    I never asked you to do my job. I love to do my part of work myself. I have searched a lot and still learning something about Linux permission using PAM.

    Also , i have found we can change the user using the Apache webserver's suExec module.

    I thought somebody, SENSEFUL enough would reply to me. BUT i feel there are still some people with "no knowledge" at all.

    If you cant understand this question then i must call you a person with "no sense".

    And also think twice before writing anything. It might spoil you image.

    Anyway, thanks for the reply and cool suggestion.
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2002
    Posts
    2
    Rep Power
    0
    What you are looking for is sudo:

    http://www.courtesan.com/sudo/

    It allows a lower-privileged user to execute certain applications as root. If you can't figure out how to use it, you shouldn't be, so I won't go into more details :)
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2002
    Posts
    2
    Rep Power
    0
    Just as another hint: It is not a good idea to allow nobody/apache perform root-tasks. Instead, I'd suggest you to use SuEXEC, wrap into a user (for example 'cpanel'), then set up sudo to allow 'cpanel' perform the task you'd like to do.
  10. #6
  11. Throws Rocks
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio
    Posts
    392
    Rep Power
    14
    Originally posted by rendy

    OK 1st step go on a C++ course for 3 years.
    Come back and rephrase you question so that we all don't think your
    a) stupid for asking such a dumb question
    b) Lazy
    c) Trying to get us to do work for you

    LOL! Thanks for the laugh!
    Two things have come out of Berkeley, Unix and LSD.
    It is uncertain which caused the other.
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2002
    Location
    Flint, MI
    Posts
    328
    Rep Power
    12
    VinayRas,

    It sounds like you're searching for a specific function call, setuid(uid_t). That changes the owner of the process from the current user to the uid of the user that you pass in as an argument. See the man page for more details.

    The project you are working on sounds very ambitious, and you sound very new to C and UNIX programming. This might not be the best learning project, because unless you have sequestered your server onto an inaccessible network, you're going to make mistakes and leave yourself open to opportunistic miscreants.
    Clay Dowling
    Lazarus Notes
    Articles and commentary on web development
    http://www.lazarusid.com/notes/
  14. #8
  15. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2002
    Location
    India
    Posts
    7
    Rep Power
    0

    Thanks for gentle reply..


    Thanks a lot for the suggestions.

    Currently i am doing the same, though I am new to System Programming, I have been lover of Linux since long. But as i was only attached to web-development using PHP, never got time to think about anything else.

    Now, i got the direction. Will learn more and apply the exisitng knowledge in making this project. And also will try to make this project as much secure as I can. Current plans are to make login via SSH. Lets see that waits in the near future...

    Thanks for the gentle help..

IMN logo majestic logo threadwatch logo seochat tools logo