autologinroot source code?

Under development: PCMCIA, wireless, etc.
Post Reply
Message
Author
flavour
Posts: 125
Joined: Thu 08 Sep 2005, 20:26
Location: Bicester, UK

autologinroot source code?

#1 Post by flavour »

Is the source code for this available?

I'd like to start work on RunAsNonRoot & hence modify this to login as Spot.

Doing a websearch, I come across this:
http://www.linuxgazette.com/issue72/chung.html

Is this all that yours does? (filesize seems about right)

$ vi autologinroot.c
int main() {
execlp( "login", "login", "-f", "root", 0);
}

$ gcc -o autologinroot autologinroot.c
$ strip autologinroot

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#2 Post by BarryK »

The source is in the Puppy Sourcerer CD.
The source packages will be hosted online soon I think.

Anyway, it's attached.

Compile it:

Code: Select all

gcc -o autologinroot autologinroot.c
Attachments
autologin-1.tar.gz
(243 Bytes) Downloaded 919 times

flavour
Posts: 125
Joined: Thu 08 Sep 2005, 20:26
Location: Bicester, UK

#3 Post by flavour »

Great, thanks - this is exactly what we had above :)

ok, so that step works nicely.

If I preconfigure the various hardware settings then the inability to write to /etc isn't an issue...neither (for me) is insmod.

For a more general distro, perhaps have these settings moved to a folder /etc/config, to which Spot can write-to. insmod can be solved by using a preconfigured sudo


Could we have sudo moved from usr_devx.sfs into core puppy? (along with a /etc/sudoers)
(I'm not sure what value having it in usr_devx.sfs is anyway...having visudo in there makes more sense...Debian Sarge's visudo binary works fine there)

A couple of tweaks that make RunAsNonRoot easier, which I think should be merged into core Puppy as don't hurt the current mode:
sed 's/etc\/.XLOADED/tmp\/.XLOADED/' /usr/X11R6/bin/xwin > /tmp/xwin.tmp
mv /tmp/xwin.tmp /usr/X11R6/bin/xwin

chmod +x /usr/share/kbd/keymaps/i386/azerty
chmod +x /usr/share/kbd/keymaps/i386/dvorak
chmod +x /usr/share/kbd/keymaps/i386/include
chmod +x /usr/share/kbd/keymaps/i386/qwerty
chmod +x /usr/share/kbd/keymaps/i386/qwertz

Thanks a lot,
F

flavour
Posts: 125
Joined: Thu 08 Sep 2005, 20:26
Location: Bicester, UK

#4 Post by flavour »

More stuff needed to get RunAsNonRoot working:

Xvesa needs to be suid root for some reason:

Code: Select all

chmod u+s /usr/X11R6/bin/Xvesa
Why not do this?

Code: Select all

sed 's/\/root\/.xinitrc/~\/.xinitrc/' /usr/X11R6/bin/xwin > /tmp/xwin.tmp
mv /tmp/xwin.tmp /usr/X11R6/bin/xwin
chmod +x /usr/X11R6/bin/xwin
If looking to use Xorg, why use /root/xorg.conf.new in /usr/sbin/xorgwizard?
It gets moved to /tmp/xorg.conf.new anyway, why not just create/use from there anyway?

I'm having problems with rxvt still..but basically it all seems feasible with a little tweaking :)

F

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#5 Post by GuestToo »

Xvesa needs to be suid root for some reason
tinylogin also needs to be suid root if you want to be able to "su root"

Post Reply