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 Fri 25 Jul 2014, 05:15
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 Posts_count  
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  609 Time(s) 
Back to top
View user's profile Send_private_message Visit_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:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


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