Tag Info

New answers tagged

0

Assuming source.txt is formatted as follows: myfolder\mynewdir1 myfolder\mynewdir2 myfolder2\subdir\mynewdir3 Batch: @echo off setlocal set folders=C:\source.txt for /f %%d in ("%folders%") do ( md %%d ) Powershell: $folders=@(Get-Content 'C:\source.txt') ForEach ($folder in $folders) { New-Item -ItemType directory -Path C:\$folder ...


-1

You should disable root login for remote host, but enable it from localhost. Here are the important lines of most of my openssh server config file: PermitRootLogin yes # because of AllowUsers PasswordAuthentication no # connexion allowed only with keys AllowUsers user root@localhost You can still connect into root by using the ...


3

You should absolutely disable the ability to login as root remotely, and if at all possible also only allow login authentication to occur with the use of public/private key pairs (not password-only). Have a look through this for best-practices on how to harden SSH (although this is provided as CentOS documentation, it applies in principal to any ...


1

@imz--IvanZakharyaschev comments on pehrs's answer that it may be possible with the introduction of namespaces, but this hasn't been tested and posted as an answer. Yes, that does indeed make it possible for a non-root user to use chroot. Given a statically-linked dash, and a statically-linked busybox, and a running bash shell running as non-root: $ mkdir ...


0

su requires the destination user password, in this case the root user's password. sudo requires the current user password and a line in /etc/sudoers on linux or /usr/local/etc/sudoers on freebsd. Linux and freebsd su do not typically observe group-based authorization. Try sudo -i as a wheel or sudo group member. If this does not work, you will have to ...


0

Sudosh may be a better solution. It logs sessions as needed and gives you "VCR" capabilities allowing you to replay sessions, its also available in most major distribution package repositories.



Top 50 recent answers are included