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 24 Oct 2014, 14:31
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
sudo 1.7.4 build script
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Sat 25 Sep 2010, 02:53    Post_subject:  sudo 1.7.4 build script  

Build script for sudo-1.7.4. Makes sudo-1.7.4.pet > mnt/home

note: script tested with Lucid and 4.3.1

To add user: run "visudo" (looks for /usr/bin/vi, so link favorite editor)

example:
spot ALL=(ALL) NOPASSWD: ALL

hint: to have terminal always open to user, add to /etc/profile.local
ex: "su spot"

Code:

#!/bin/sh

cd /tmp
mkdir sudo-1.7.4
wget http://www.sudo.ws/sudo/dist/sudo-1.7.4p4.tar.gz
tar -xvzf sudo-1.7.4p4.tar.gz 
cd sudo-1.7.4p4
./configure --with-pam=no --with-pam-login=no --disable-pam-session CFLAGS="-mtune=i486 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"  --prefix=/usr --sysconfdir=/etc --localstatedir=/var
make
make DESTDIR=/tmp/sudo-1.7.4 install
cd /tmp/sudo-1.7.4

rm -r usr/share
rm -r var
find . | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null

cd ..
tar -cvzf sudo-1.7.4.tar.gz sudo-1.7.4/*
tgz2pet sudo-1.7.4.tar.gz
cp  sudo-1.7.4.pet /mnt/home

rm -r sudo*   
clear
echo "sudo-1.7.4.pet is now in /mnt/home"

exit
Back to top
View user's profile Send_private_message 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Sun 26 Sep 2010, 19:34    Post_subject:  

I took out any /var files, which can break cups and don't otherwise appear necessary.

notes: If you add user to /etc/profile.local (eg, "su spot" ), puppy should boot to prompt in user shell. Type "exit" to load X (drops to root shell).

Script to quickly close most recent terminal window in user shell..name something like "q"
Code:

 #!/bin/sh
###  exits most recent terminal window

VAR="$(ps | grep rxvt | grep -v "grep" | tail -n 1 | awk '{print $1}')"
sudo kill -9 "$VAR"
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 » Additional Software (PETs, n' stuff) » Utilities
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.0395s ][ Queries: 12 (0.0039s) ][ GZIP on ]