| Author |
Message |
flavour
Joined: 08 Sep 2005 Posts: 124 Location: Bicester, UK
|
Posted: Wed 08 Feb 2006, 16:31 Post subject:
autologinroot source code? |
|
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
|
|
Back to top
|
|
 |
BarryK
Puppy Master

Joined: 09 May 2005 Posts: 6860 Location: Perth, Western Australia
|
Posted: Thu 09 Feb 2006, 18:47 Post subject:
|
|
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: | | gcc -o autologinroot autologinroot.c |
| Description |
|

Download |
| Filename |
autologin-1.tar.gz |
| Filesize |
243 Bytes |
| Downloaded |
494 Time(s) |
|
|
Back to top
|
|
 |
flavour
Joined: 08 Sep 2005 Posts: 124 Location: Bicester, UK
|
Posted: Sat 11 Feb 2006, 07:01 Post subject:
|
|
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
|
|
Back to top
|
|
 |
flavour
Joined: 08 Sep 2005 Posts: 124 Location: Bicester, UK
|
Posted: Sat 11 Feb 2006, 18:24 Post subject:
|
|
More stuff needed to get RunAsNonRoot working:
Xvesa needs to be suid root for some reason:
| Code: | | chmod u+s /usr/X11R6/bin/Xvesa |
Why not do this?
| Code: | 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
|
|
Back to top
|
|
 |
GuestToo
Puppy Master
Joined: 04 May 2005 Posts: 4078
|
Posted: Sat 11 Feb 2006, 19:21 Post subject:
|
|
| Quote: | | 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"
|
|
Back to top
|
|
 |
|