Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
 

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: SSH and adduser< Next Oldest | Next Newest >
jfred1989 Offline





Group: Members
Posts: 2
Joined: Aug. 2004
Posted: Aug. 02 2004,12:59 QUOTE

Hi I am trying to configure ssh on dsl and need to add a user on the system to log in with. The adduser comand threw some errors about not being able to edit the password file. I also tried logging onto ssh with root but was unsure of what the actual root password is. If it matters i have been loading the cd into ram with the dsl toram boot opton. Any help is apreciated thanx. :)
Back to top
Profile PM 
roberts Offline





Group: Members
Posts: 4983
Joined: Oct. 2003
Posted: Aug. 02 2004,13:06 QUOTE

You set the root password for root by using sudo passwd
You should always do this before using SSH.

Adding users is not currently supported on the liveCD or toram. Because there are no login screens. I know you are thinking SSH accounts.  Adding users is supported  if you do an enhanced or standard hard drive installation.
Back to top
Profile PM WEB 
jfred1989 Offline





Group: Members
Posts: 2
Joined: Aug. 2004
Posted: Aug. 02 2004,13:22 QUOTE

thanx that clears things up for me.
Back to top
Profile PM 
clacker Offline





Group: Members
Posts: 570
Joined: June 2004
Posted: Aug. 04 2004,18:29 QUOTE

Roberts, just for the giggles of being able to add a user for ssl from a LiveCD, I think the following script enables useradd and groupadd to work correctly.  I had read about people on the board changing shadow files and such from links to copies of the files, so I tried it out myself.  The script needs to be run as SU, perhaps with sudo bash enableuser.sh

Code Sample
#!/bin/bash
rm /etc/passwd-
rm -f /etc/passwd.org
cp /KNOPPIX/etc/passwd- /etc/passwd-
cp /KNOPPIX/etc/passwd.org /etc/passwd.org
rm -f /etc/gshadow
rm -f /etc/gshadow-
rm -f /etc/shadow.org
cp /KNOPPIX/etc/gshadow /etc/gshadow
cp /KNOPPIX/etc/gshadow- /etc/gshadow-
cp /KNOPPIX/etc/shadow.org /etc/shadow.org
rm -f /etc/group-
rm -f /etc/group.org
cp /KNOPPIX/etc/group- /etc/group-
cp /KNOPPIX/etc/group.org /etc/group.org


Then add groups with

    sudo groupadd friends (or whatever)

and add users with

    sudo useradd jones

You still can't login or out, of course, but you can start the ssl daemon and log in as that user with that password.
Back to top
Profile PM 
roberts Offline





Group: Members
Posts: 4983
Joined: Oct. 2003
Posted: Aug. 04 2004,23:00 QUOTE

clacker,

yes, it can be done, just as you have. Nice job. It is just not that practical for general use. You should also then add the files that you moved to your filetool.lst for backup/restore. This is fine for those that need mutiple ssh users.

I remember when there was so much debate about starting the ssh daemon or the scp progam.

It is not in the general distro, as we are very aware, of ramdisk usage and even more so inode usage, in order to support our users with very low memory.

However, for a dedicated purpose machine, your script could be very helpful for someone that needs ssh/scp users.

Thanks for sharing.
Back to top
Profile PM WEB 
4 replies since Aug. 02 2004,12:59 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

 
reply to topic new topic new poll
Quick Reply: SSH and adduser

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code