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 Tue 22 Jul 2014, 05:35
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 [2 Posts]  
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 from previous:   Sort by:   
Page 1 of 1 [2 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
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.0387s ][ Queries: 11 (0.0031s) ][ GZIP on ]