Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 20 Apr 2014, 01:36
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
autologinroot source code?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [5 Posts]  
Author Message
flavour

Joined: 08 Sep 2005
Posts: 124
Location: Bicester, UK

PostPosted: 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
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: 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
autologin-1.tar.gz
Description 
gz

 Download 
Filename  autologin-1.tar.gz 
Filesize  243 Bytes 
Downloaded  599 Time(s) 
Back to top
View user's profile Send private message Visit poster's website 
flavour

Joined: 08 Sep 2005
Posts: 124
Location: Bicester, UK

PostPosted: Sat 11 Feb 2006, 07:01    Post subject:  

Great, thanks - this is exactly what we had above Smile

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
View user's profile Send private message 
flavour

Joined: 08 Sep 2005
Posts: 124
Location: Bicester, UK

PostPosted: 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 Smile

F
Back to top
View user's profile Send private message 
GuestToo
Puppy Master

Joined: 04 May 2005
Posts: 4078

PostPosted: 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
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [5 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0509s ][ Queries: 13 (0.0051s) ][ GZIP on ]