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 Wed 26 Nov 2014, 14:47
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 Posts_count  
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
Sub_title: 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.


Edited_times_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
Sub_title: 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.


Edited_time_total
Back to top
View user's profile Send_private_message 
amigo

Joined: 02 Apr 2007
Posts: 2278

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: 3972
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_website 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » HOWTO ( Solutions )
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.0838s ][ Queries: 11 (0.0079s) ][ GZIP on ]