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 Thu 17 Apr 2014, 02:26
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
How to protect the exit from user space in terminal mode
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [4 Posts]  
Author Message
postfs1


Joined: 27 Mar 2010
Posts: 831

PostPosted: Mon 21 Feb 2011, 11:29    Post subject:  How to protect the exit from user space in terminal mode
Subject description: Operating System: "Quirky Linux - 1.40"
 

Variant of using of the operating system: booting from the CD into RAM.

Using of the shown scheme can cause the problems in the system. >>>

[1] :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>:
Parameters of booting:
puppy parameter-1 parameter-2 parameter-* pfix=nox,ram
Rolling Eyes
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
[2] :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>:
execution of such a command:
Code:
passwd root

will ask you to input a new password for user "root"
Rolling Eyes
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
[3] :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>:
execution of such a command:
Code:
passwd spot

will ask you to input a new password for user "spot"
Rolling Eyes
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
[5] :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>:
execution of such a command:
Code:

cat /etc/inittab | sed -e '2,2d' > /etc/inittab

will delete in the file "inittab" the following line:
Quote:

tty1::respawn:/sbin/getty -n -l /bin/autologinroot 38400 tty1

Rolling Eyes
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
[6] :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>:
execution of such a command:
Code:
rm /dev/tty1

will delete "tty1" file
Rolling Eyes
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
[7] :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>:
execution of such a command:
Code:
kill -9 `pidof sh`

will lock the command window
Rolling Eyes
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
[8] :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>:
Pushing onto the "Alt" button and retention of pressure.
Pushing onto the "F2" button, and then, the dismission of these two buttons.
Now, tty2 is in your disposal and you can enter into the user space.
Rolling Eyes
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
[9] :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>:
Code:

ln -s /dev/loop10 /dev/tty1

Rolling Eyes
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

<<< Using of the shown scheme can cause the problems in the system.

= = = = = = = = = = = = = = = = = =
= = = = = = = = = = = = = = = = = = =
= = = = = = = = = = = = = = = = = =
Question:
What is mounted on /dev/loop10?
Answer:
I don't have such an information which will give the knowledge.

_________________
  • I don't know why laboratories are named a hospitals.
  • The alive personage is like a tea bag with granules of unknown density inside, at that one the packet was made of organic material and was placed in the evaporated liquid or liquid.


Last edited by postfs1 on Fri 18 May 2012, 17:34; edited 8 times in total
Back to top
View user's profile Send private message 
postfs1


Joined: 27 Mar 2010
Posts: 831

PostPosted: Thu 15 Sep 2011, 14:55    Post subject: How to protect the exit from user space in terminal mode
Subject description: Version - 2 ; Operating System: "Quirky Linux - 1.40"
 

Variant of using of the operating system: booting from the CD into RAM.

START

[1] :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>:
Parameters of booting:
puppy parameter-1 parameter-2 parameter-* pfix=nox,ram
Rolling Eyes
|= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =|
[2] :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>:
execution of such a set of commands --->
Code:
rm /bin/autologinroot ; echo '#!/bin/bash' > /bin/autologinroot ; echo "/sbin/getty 38400 tty1" >> /bin/autologinroot ; chmod 0100 /bin/autologinroot

<---
will give a new door
Rolling Eyes
|= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =|
[3] :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>:
execution of such a command --->
Code:
kill -9 `pidof sh`

<---
will give a new situation
Rolling Eyes
|= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =|
[5] :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>:
execution of such a command --->
Code:

passwd spot

<---
will ask to input a new password for user "spot"
Rolling Eyes
|= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =|
[6] :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>:
execution of such a command --->
Code:

passwd nobody

<---
will ask to input a new password for user "nobody"
Rolling Eyes
|= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =|
[7] :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>: :>:
execution of such a command --->
Code:

passwd root

<---
will ask to input a new password for user "root"
Rolling Eyes
|= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =|

FINISH

---------------------------------------------------------------------------------------
|-<>-|-<>-|-<>-|-<>-|-<>-|-<>-|-<>-|-<>-|-<>-|-<>-|-<>-|-<>-|-<>-|-<>-|-<>-|-<>-|
---------------------------------------------------------------------------------------

-----------------------------------------or-----------------------------------------

Code:

#!/bin/bash
rm /bin/autologinroot ;
echo "#!/bin/bash" > /bin/autologinroot ;
echo '/sbin/getty 38400 tty1' >> /bin/autologinroot ;
chmod 0100 /bin/autologinroot ;
sleep 0.5s ;
echo 'Now, use such a command: kill -9 `pidof sh`'


= = = = = = = = = = = = = = = = = =
= = = = = = = = = = = = = = = = = = =
= = = = = = = = = = = = = = = = = =
Questions:
BTW what exit do you mean ? Exit to prompt from Xorg or exit the shell in console mode ?
Answer:
exit the shell in console mode

_________________
  • I don't know why laboratories are named a hospitals.
  • The alive personage is like a tea bag with granules of unknown density inside, at that one the packet was made of organic material and was placed in the evaporated liquid or liquid.


Last edited by postfs1 on Fri 18 May 2012, 17:26; edited 1 time in total
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2166

PostPosted: Fri 18 May 2012, 12:42    Post subject:  

What is mounted on /dev/loop10?
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3860
Location: Kiel,Germany

PostPosted: Fri 18 May 2012, 15:54    Post subject:  

Quote:
cat /etc/inittab | sed -e '2,2d' > /etc/inittab

better avoid, could buggy sed/cat combination empty the target file (sometimes Rolling Eyes )

would better use

sed -i "STRING" /path/to_file

or

cat /file |sed "WHATEVER" >/tmp/file
mv -i /tmp/file /file

*

BTW what exit do you mean ? Exit to prompt from Xorg or exit the shell in console mode ?
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [4 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
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.0754s ][ Queries: 11 (0.0132s) ][ GZIP on ]