-
Notifications
You must be signed in to change notification settings - Fork 0
Linux
superstringer edited this page Apr 15, 2019
·
1 revision
$ sudo adduser <username>
To add user as a sudoer,
$ sudo adduser <username> sudo
To add a new user say UNAME and create their home directory on /D drive, we do
$ sudo adduser --home /D/home/UNAME UNAME
First, if we decide to backup the home folder
$ tar -zcvf homedir_UNAME.tar.gz /home/UNAME
then remove the user together with their home directory
$ sudo deluser --remove-home UNAME
or remove the user and all files on the system owned by the user (including their home directory)
$ sudo deluser --remove-all-files UNAME
- Install
osxfuse - Install
sshfs - Create a mount point folder. This is where the server's files will appear.
- Mount it.
#!bash
$ brew install Caskroom/cask/osxfuse
$ brew install sshfs
$ mkdir -p ~/mount/my-server
$ sshfs -p 22 dh@68.137.6.28: ~/mount/my-server
$ apt-get source PACKAGE
$ tar xvzf PACKAGE.tar.gz
$ cd PACKAGE
$ ./configure --prefix=$HOME/local
$ make
$ make install
For python, for configure you can do the following instead
$ ./configure --enable-shared --prefix=$HOME/local
You can also then use fakeroot to do stuff.
To connect to Machine C from Machine B using Machine A's public key without copying over to Machine B, first on Machine A add your SSH (private) key to the ssh-agent, for example on mac you do
$ ssh-add -K ~/.ssh/id_rsa
then connect to Machine B with
$ ssh -A user@MachineB
Then you can ssh to Machine C from that Machine B session.