How to make Tahrpup require a username and password?[SOLVED]

Booting, installing, newbie
Post Reply
Message
Author
oldbones
Posts: 16
Joined: Sat 14 Feb 2015, 18:17
Location: South Wales

How to make Tahrpup require a username and password?[SOLVED]

#1 Post by oldbones »

I am running Tahrpup-6.0 and i'm really impressed with it. Only one thing i would like to know. At the moment Tahrpup boots up without any input from me. For example signing in with a username and password. Is there a way to make tahrpup run only if a username and password is typed in? Thanks
Last edited by oldbones on Fri 20 Feb 2015, 17:18, edited 1 time in total.

watchdog
Posts: 2021
Joined: Fri 28 Sep 2012, 18:04
Location: Italy

#2 Post by watchdog »

If you use a frugal install and you want root privilegies then you should consider an encrypted savefile or using xlock: a script in /root/Startup launching xlock should do the job.

Code: Select all

#!/bin/sh
xlock
Copy this simple code in a file and put it In /root/Startup giving it execute permissions.

oldbones
Posts: 16
Joined: Sat 14 Feb 2015, 18:17
Location: South Wales

#3 Post by oldbones »

Hi watchdog
I used a full install for tahrpup. Would this make a difference?
Thanks for the reply.

User avatar
festus
Posts: 235
Joined: Wed 14 Jan 2015, 19:10

#4 Post by festus »

Hello, oldbones.

Puppy by default boots straight into the root account without any intervention from this user. If for some reason you want Puppy to stop require a login and password, you have to edit the second line in "/etc/inittab" as follows:

Code: Select all

Here is the default /etc/inittab file (lxpuptahr):

::sysinit:/etc/rc.d/rc.sysinit
tty1::respawn:/sbin/mingetty --autologin root tty1
tty2::respawn:/sbin/getty 38400 tty2
tty3::respawn:/sbin/getty 38400 tty3
::ctrlaltdel:/sbin/reboot	

Here is the modified /etc/inittab file, changes on line 2 only:
::sysinit:/etc/rc.d/rc.sysinit
tty1::respawn:/sbin/getty 38400 tty1
tty2::respawn:/sbin/getty 38400 tty2
tty3::respawn:/sbin/getty 38400 tty3
::ctrlaltdel:/sbin/reboot
After changing inittab, on the next boot, Puppy will stop and require a login.
To set and change the password, on the command line do this:

Code: Select all

passwd root
Then follow the on screen instructions.
Reboot and Login as root.

Hope this info helps. :)

watchdog
Posts: 2021
Joined: Fri 28 Sep 2012, 18:04
Location: Italy

#5 Post by watchdog »

oldbones wrote:Hi watchdog
I used a full install for tahrpup. Would this make a difference?
Thanks for the reply.
The xlock solution should work in a full install. Look previous post for a more elegant solution.

dcc701
Posts: 62
Joined: Wed 23 Apr 2014, 07:40
Location: Seattle, US

#6 Post by dcc701 »

watchdog or others:
I'm running frugal tahrpup. I tried what watchdog suggested but my session froze. Had to do a hard shutdown. Basically, I created a new script in Startup folder, named it "requirepassword", opened as text, added "xlock" under the "#!/bin/sh" that was already there, then went to permissions and chose the first one "a+x...executable." Session froze as soon as I saved this. Am I doing something wrong?

watchdog wrote:
"If you use a frugal install and you want root privilegies then you should consider an encrypted savefile or using xlock: a script in /root/Startup launching xlock should do the job.

Code:
#!/bin/sh
xlock

Copy this simple code in a file and put it In /root/Startup giving it execute permissions."

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#7 Post by bigpup »

Try this:
1. To configure screen locking, right-click the lock icon on the desktop; configure, if you want
2. click Lock the screen now
3. enter Key (password)
4. REMEMBER PASSWORD
5. enter Key again
screen is locked
6. to unlock, hit Enter and, when asked (it may take a minute or so), enter password
.....To set locking on boot-up......
1. click file icon on desktop
2. click Startup
3. right-click a blank space on the (~/Startup) window
4. choose New > Script
5. name new script xlock and click Create
6. right-click xlock icon, and choose Open As Text
the new window (named xlock) which opens will already have the first line - #!/bin/sh
7. on the second line, type xlock& and hit enter
8. save and close file
9. close ~/Startup window
.............
now, whenever you start this puppy ('booting' a puppy just sounds mean!), the screen will lock after a few seconds
to unlock it, hit Enter, wait for the message, type in the password, and hit Enter
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

dcc701
Posts: 62
Joined: Wed 23 Apr 2014, 07:40
Location: Seattle, US

#8 Post by dcc701 »

Thanks again, bigpup; tried it and it worked. I guess it was the "&" after "xlock" that did it.

unL33T
Posts: 8
Joined: Sun 10 May 2015, 00:05

#9 Post by unL33T »

bigpup wrote:Try this:
1. To configure screen locking, right-click the lock icon on the desktop; configure, if you want
2. click Lock the screen now
3. enter Key (password)
4. REMEMBER PASSWORD
5. enter Key again
screen is locked
6. to unlock, hit Enter and, when asked (it may take a minute or so), enter password
.....To set locking on boot-up......
1. click file icon on desktop
2. click Startup
3. right-click a blank space on the (~/Startup) window
4. choose New > Script
5. name new script xlock and click Create
6. right-click xlock icon, and choose Open As Text
the new window (named xlock) which opens will already have the first line - #!/bin/sh
7. on the second line, type xlock& and hit enter
8. save and close file
9. close ~/Startup window
.............
now, whenever you start this puppy ('booting' a puppy just sounds mean!), the screen will lock after a few seconds
to unlock it, hit Enter, wait for the message, type in the password, and hit Enter
This worked for me, as well. Although strangely when it starts it does not show X's as you type the password and the screen saver is something different every time while when I run the Lock from the desktop it shows X's when I type and it's always the same screen saver.

reedman
Posts: 14
Joined: Thu 10 Nov 2005, 20:09

Tahrpup Password

#10 Post by reedman »

Hey, unL33T,

My experience was the same. Journeyed to the man page for xlock. (Located at http://linux.die.net/man/1/xlock .) A very mature application, as it turns out. Anyhoo, since I was not a fan of its explosive, multi-colored, rotating screensaver, I opted for a blank screen, implemented every time through the use of the following script, which I placed in my Startup folder in root:

Code: Select all

#!/bin/sh
xlock -mode blank


Things are quieter now, the way I prefer it. By the way, the mouse and keyboard are disabled by default, and that is why no characters are seen when you are typing your uncrackable tahrpup password.

Cheers.

Post Reply