Linux User & File Management

From 2047Servers Support
Jump to: navigation, search
Line 23: Line 23:
  
 
[[File:sudoers.png|500px]]
 
[[File:sudoers.png|500px]]
 +
  
 
After you have finished adding the new account you will need to save the file "Ctrl + X" (To exit) it will then ask to save "y = yes" - "n = no"
 
After you have finished adding the new account you will need to save the file "Ctrl + X" (To exit) it will then ask to save "y = yes" - "n = no"
  
 
If you wish to fine tune the sudoers file visit here for advance uses -  http://linux.die.net/man/5/sudoers
 
If you wish to fine tune the sudoers file visit here for advance uses -  http://linux.die.net/man/5/sudoers
 +
 +
&nbps
 +
&nbps
 +
 +
=== Restricting SSH access ===
 +
 +
To restric access to SSH for a user is very simple all you have to do is edit the "/etc/passwd" file
 +
 +
nano /etc/passwd
 +
 +
 +
 +
Once your are editing the file, you should notice the user you recently created is near or at the bottom of the list (Example line below)
 +
 +
newuser:x:1008:1008::/home/newuser:/bin/false
 +
 +
The first part is the username, in this case "newuser"
 +
The "x" means a password is set for the user
 +
The two numbers have different meanings, the first number "1008" in this case is the User ID. The second number is the Group ID (Stored in /etc/group)
 +
The "/home/newuser" is the users current home directory (We will cover more about this in the FTP part below)
 +
The last part is the most important to this step "/bin/false" means they have "No" SSH access, it will be "/bin/sh" by default (Meaning they have SSH access), so change this from "/bin/sh" > "/bin/false" to disable SSH access for that user. 
 +
 +
 +
&nbps
 +
&nbps
 +
 +
== Users & FTP Access ==

Revision as of 15:33, 3 February 2013

Personal tools
Namespaces

Variants
Actions
Navigation
Categories