password protection?


Forum: Other Help Topics
Topic: password protection?
started by: abnorm999

Posted by abnorm999 on Aug. 02 2007,01:00
could someone please tell me how to set a logon password for DSL?
Posted by curaga on Aug. 02 2007,11:25
for what kind of install?
Posted by abnorm999 on Aug. 02 2007,12:29
oh sorry its on a pendrive
Posted by fioddor on Aug. 04 2007,21:53
I've got the same question. I've got a frugal install.

In my case I just needed users with passwords to connect via ssh. The first answer was the passwd command. Then the remaining questions are

a) How to make the passwords persistant?

I've included /etc/shadow in the backup to make it persistant, but after rebooting the sshd doesn't recognise them. Though I can see the encoded passwords in /etc/shadow restored, typing them in the ssh client doesn't work. I get the connection rejected.

b) How to force the system to ask for them?
After rebooting the machine, the system just loads without asking.

Note: When installing to hard disk the system creates and uses the passworded users. It requests the passwords to log in. How do we force the same effect in frugal installs?

Posted by curaga on Aug. 05 2007,06:24
The frugal install emulates a livecd, which by nature does not ask for passwords..
Installing to HD is the easiest way..

Posted by abnorm999 on Aug. 08 2007,03:45
i got the "dsl protect" and "dsl secure" commands..but how do you make them presistant on a pendrive install?
Posted by infinitycircuit on Aug. 08 2007,07:39
To make passwords persistent you need to back up /etc/shadow, as this is where encrypted passwords are stored.    Obviously, type passwd to set this password.

To be prompted for the password on boot you need to:
1) Change the last lines in /etc/inittab to /sbin/getty instead of /bin/??? -login (I don't have it in front of me so I don't remember the original).
2) Add /etc/inittab to /opt/bootlocal.sh
3) Backup both of these files.

I might have messed something up as I am working from memory but that's the basic pattern.  This is off of a post by mikshaw in the thread below.
Check out this thread for more information: < http://damnsmalllinux.org/cgi-bin....assword >

Posted by fioddor on Aug. 08 2007,08:50
I've checked the topic pointed out by infinitycircuit (thank you very much!) and found a post by magicpio on July 04 2005:

< http://damnsmalllinux.org/cgi-bin....4;st=85 >

(at the bottom of the page)

Posted by infinitycircuit on Aug. 08 2007,19:49
I made an error in my description of how to solve the problem and linked to the wrong post.  :blush:

/opt/bootlocal.sh needs to have 'telinit q' added.

See < http://damnsmalllinux.org/cgi-bin....36;st=0 > for more information.

Posted by Divago on Sep. 13 2007,10:35
I got a similar problem
i need DO NOT ask for dsl user password, BUT i need to ask for password while doing "su" command

better explain:
i'm using a dsl (technically a dsl-n) frugal installed on a hdd and loaded toram

i need a root password, both for security and to log using ssh; so i used "passwd" to change password, then added /etc/shadow into .filetool backup file list
it works

BUT
whenever i type "su" into dsl user, it change to root without asking password

then edited /etc/sudoers file, commenting the "dsl     ALL=NOPASSWD: ALL" line.
when i use "su" command it ask for password BUT it use dsl password (and i dunno what is the dsl password...)
btw, even if i type correctly dsl password, it does not work

i mean:
dsl@dslbox:~$ su
dsl@dslbox:~$
(nothing happens and i don't log into root user)
how can i solve this?
there is another file to edit?
su works different on dsl than in other linux?

added:
i need to NO insert password at boot for dsl user; so i can't use cheat code "secure"

ty for help

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.