Generating a session programatically (auto-login from another software)

Post Reply
alexm
Junior Member
Posts: 1
Joined: 23 Aug 2016, 15:01

Generating a session programatically (auto-login from another software)

Post by alexm »

I'm developing a server control panel and I wish to integrate csf into it (basically a link that opens a new page with CSF's integrated UI). Since I don't want users to have to enter another username and password just to login into csf, I need it to login automatically.

Where can I find the logic that generates the sessions in /var/lib/csf/ui/ui.session or is there an example of how can this be achieved? I'm trying to do so because I wish to avoid modifying the stock CSF files.
ForumAdmin
Moderator
Posts: 1524
Joined: 01 Oct 2008, 09:24

Re: Generating a session programatically (auto-login from another software)

Post by ForumAdmin »

It would be better to use the mechanism used for cPanel/DA/Webmin. If you look in the distribution tarball at cpanel/csf.cgi, da/exec/da_csf.cgi or webmin/csf/index.cgi they all provide front-end access to the csf root UI. The process must be running under the root user (although the DA interface uses a bespoke SUID binary to achieve this).
Post Reply