ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The usual solution is to start sudo with the command you want processed.
Sudo will then prompt for the appropriate password if the user is authorized...
If you are using a GUI there are a couple of GUI versions that accomplish the same thing.
The reason you don't is that there is NO reason for the user to trust your installer beyond what it should be doing. There is no reason for it to HAVE the root password, as you may have a trojan that passes the root password off to someone else...
The usual solution is to start sudo with the command you want processed.
Sudo will then prompt for the appropriate password if the user is authorized...
If you are using a GUI there are a couple of GUI versions that accomplish the same thing.
The reason you don't is that there is NO reason for the user to trust your installer beyond what it should be doing. There is no reason for it to HAVE the root password, as you may have a trojan that passes the root password off to someone else...
There are no authorized users because
we are in the install process.
This "catch-22" is almost breaking
my will.
If the admins are installing the system, they are the ones to set it up.
Not you. You DO get to tell them to configure it. But it is up to the site policy as to who gets to do what to the system. And passing the root password around is not a proper security policy.
Now if you are writing a system installer, then your installer is ALREADY root. But most of those are NOT written in C++. They are frequently done in Python, or shell scripts.
If the admins are installing the system, they are the ones to set it up.
Not you. You DO get to tell them to configure it. But it is up to the site policy as to who gets to do what to the system. And passing the root password around is not a proper security policy.
Now if you are writing a system installer, then your installer is ALREADY root. But most of those are NOT written in C++. They are frequently done in Python, or shell scripts.
Thank you. I am writing a system installer.
I'm thinking about the Anaconda installer.
During the install process
the installer asks for a user generated
password for the root account.
I would just like to take that input
and finish installing a custom distro.
I am most comfortable in C++. I'm aware
of the runtime support needed to get
things going.
Thanks for your help!
Last edited by TheHarmattan; 03-02-2015 at 03:18 PM.
It is much more flexible to use one already written - such as Anaconda.
Installation tools are quite large, and have to handle a number of complex subjects. That was why Anaconda is written in Python.
And it is possible to do a custom distribution with Anaconda - it usually called a "spin", and there are tools available that make it realatively easy to do.
they are complex, but the subjects that they handle are simple
unpack all the packages
set up language, time, etc
what else ?
anaconda is very complex, not recommended playing around with
keyboard setup,
display setup,
disk partitioning,
identifying the target to install on (partition/lvm/mdadm + partitioning)
identifying the source to retrieve the packages from (URL/net? disk? USB? NFS?) and setup,
package selection (assuming there IS a choice).
filesystem to use (xfs,ext4,btrfs,other?)
boot configuration and initialization,
mount configuration (fstab setup mostly),
swap configuration and initialization,
Of course, if all of this is supposed to be done, then you aren't doing an installation, but something closer to just cloning a disk...
In which case all you do is install the finished clone.
Anaconda is rather complex because it is trying to do something that IS complex.
No. It can't be specific. The technique is not that complicated.
Another place to look would be in the passwd utility. It does the same thing.
Now one thing that MAY be a problem is that during the initial install, the terminals are NOT configured. You have to do that if you are using a terminal interface. If you are using a GUI, then Anaconda is quite reasonable to look at, as it uses the same GUI libraries that you would likely be using.
No. It can't be specific. The technique is not that complicated.
Another place to look would be in the passwd utility. It does the same thing.
Now one thing that MAY be a problem is that during the initial install, the terminals are NOT configured. You have to do that if you are using a terminal interface. If you are using a GUI, then Anaconda is quite reasonable to look at, as it uses the same GUI libraries that you would likely be using.
Thanks jpollard. You and everyone in this post
have been very accommodating.
Cheers, friend. I'll come back to
this post and report later this evening.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.