- Configuration file for the ls color command is /etc/DIR_COLORS for Linux
- sftp only
- ChrootDirectory: Specifies the pathname of a directory to chroot(2) to after authentication. All components of the pathname must be root-owned directories that are not writable by any other user or group. After the chroot, sshd(8) changes the working directory to the user's home directory.
- http://serverfault.com/questions/354615/allow-sftp-but-disallow-ssh
http://serverfault.com/questions/584986/bad-ownership-or-modes-for-chroot-directory-component - sshd_config
OrSubsystem sftp internal-sftp Match group sftponly ChrootDirectory /home/%u X11Forwarding no AllowTcpForwarding no ForceCommand internal-sftp
Match user MY_USER ChrootDirectory /var/www/RESTRICTED_DIR
# chown root:root /var/www/RESTRICTED_DIR # chmod 755 /var/www/RESTRICTED_DIR
- Using loop devices is very convenient when training with Raid for instance. To create usable devices for a Raid, it works as for a file-system, except that instead of mounting the file as a loop device they must be setup with the tool ”
losetup
” that is part of the Linux utilities. In fact, it is not possible to prepare devices for a Raid that are already mounted, andlosetup
makes a loop device in /dev/ ready to be mounted in a way that it is possible to run ”mount /dev/loop0 mount-point
” instead of ”mount -o loop file mount-point
”.
Preparing a Raid5 works as follow:- Create 3 files:
dd bs=1M count=100 if=/dev/zero of=0
dd bs=1M count=100 if=/dev/zero of=1
dd bs=1M count=100 if=/dev/zero of=2
- Setup loop devices:
losetup /dev/loop0 0
losetup /dev/loop1 1
losetup /dev/loop2 2
- Prepare the Raid5 device:
mdadm --create --verbose /dev/md0 --level=5 --raid-devices=3 /dev/loop0 /dev/loop1 /dev/loop2
- Mount the Raid5 device:
mount /dev/md0 mount-point
- Why VNC not showing actual Remote Desktop
vncserver
doesn't connect to the actual desktop; it creates a virtual desktop that is configured separately, on another display, probably :1. the X11 session defined in ~/.vnc/xstartup, a minimal X11 session.- To access a different desktop that looks the same, you have to start it in this
xstartup
file, e.g. withexec gnome-session
or something similar, have a look for documentation onxinitrc
orxsession[rc]
) - To access the same desktop session, you need a different VNC server.
x11vnc
can dodesktop sharing; in your GNOME environment, Vino is probably the preferable choice - you might be able to use
Xvnc
withinetd
as described in its man page (last paragraph of the linked section). Another (kind of high-overhead but neat) solution might be using the Guacamole remote desktop gateway and configuring access there - Please uncomment following two lines in xstartup file under
~/.vnc/xstartup
:Before:#unset SESSION_MANAGER #exec /etc/X11/xinit/xinitrc [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources xsetroot -solid grey vncconfig -iconic & xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & twm &
After:unset SESSION_MANAGER exec /etc/X11/xinit/xinitrc [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources xsetroot -solid grey vncconfig -iconic & xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & twm &
- ttt
Tuesday, February 28, 2012
Linux/Unix misc
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment