First off log in to the server per SSH, we'll use "server" as server's name and admin as the user with sudo rights (for SSH connections you'll need Putty on windows, Terminal on mac OS X and a normal terminal on Linux).
ssh -Y admin@server
Now add the new user using a name without empty spaces or artistic symbols (i'll use here "mynewuser" as my new user name) :
sudo adduser mynewuser
After you've answered all nifty questions (and given a good, solid password), we can proceed to folder creation. First let's temporarily log as the new user and go to its home folder :su mynewuser Password: cd
mkdir mynewfolder
Once this is done, log out of "mynewuser"'s shell :
exit
Now that you're "admin" once again, use the editor you want (can be vi) and open the partition file fstab :
sudo gedit /etc/fstab
In this file add the following line to the end :
/media/network_folder /home/mynewuser/mynewfolder none rw,bind 0 0
where /media/network_folder is the path to the folder you want to give mynewuser access to. Now is maybe time to say that i cannot be held responsible for what happens when you taint fstab, but let it be known that if you hose your fstab file, you'll trash your server big time. It's one of those files with /etc/passwd you don't want to defile.Now to load the modifications, issue :
sudo mount -a
That was it for a first writing of this howto...
No comments:
Post a Comment