Reply To: Logging in to zeroshell’s ssh as a user (not admin)

Home Page Forums Network Management ZeroShell Logging in to zeroshell’s ssh as a user (not admin) Reply To: Logging in to zeroshell’s ssh as a user (not admin)



@bdsnyder wrote:

In my post boot script I added:

echo “backup:x:50003:100::/backup:” >> /etc/passwd
echo “AllowUsers admin backup” >> /etc/ssh/sshd_config
/etc/init.d/sshd stop
/etc/init.d/sshd start

That will help, thanks! I can use this same method for a lot of other settings changes.

for instance,
iptraf wants to save it’s settings in a file, but the directory doesn’t exist, so this will create the directory it needs:

mkdir /var/local/iptraf

(of course, the iptraf.cfg file itself doesn’t carry over, but that’s ok for now)

For copying files, here’s how I temporarily mount a usb flash drive as another filesystem. My zeroshell boots from a IDE hard drive. I used this to export some tcpdump files that I collected.

I plug in the USB drive.
then, from the ssh admin login, or the Shell prompt on the console,
dmesg | more

I get this information at the end of the dmesg entries:

Initializing USB Mass Storage driver...
scsi2 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver ub
scsi 2:0:0:0: Direct-Access USB 2.0 USB Flash Drive 0.00 PQ: 0 ANSI: 2
sd 2:0:0:0: [sda] 7897088 512-byte hardware sectors (4043 MB)
sd 2:0:0:0: [sda] Write Protect is off
sd 2:0:0:0: [sda] Mode Sense: 00 00 00 00
sd 2:0:0:0: [sda] Assuming drive cache: write through
sda: sda1
sd 2:0:0:0: [sda] Attached SCSI removable disk

So, it is /dev/sda1 in this case. ( “sda: sda1”)

mkdir /usbtmp
mount /dev/sda1 /usbtmp
copy files to or from the usb drive at /usbtmp.
cd /
umount /usbtmp