The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




Thread: managing users
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 09-20-2000
Neo's Avatar
Neo Neo is online now Forum Staff  
Administrator
  
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 6,797
Wink

OK. The actual commands and flags depend on the flavor of UNIX you are playing on (YMMV):

In Linux you add users with the 'adduser' command.

After adding users, you create a group by editing the
/etc/group file and add users to the group. I use the
VI editor.

Now you have users and groups .

The permissions are based on your different requirements.
Lets say you want the new users to write in the directory
but no modify it.

mkdir /tmp/newdirectory

chown root.newgroup /tmp/newdirectory

chmod 770 /tmp/newdirectory

This means that root will be able to read, write, and search; members of the newgroup will be able to do the
same. Other users and groups will have no permissions
to write, search or read the directory.

It is best, IMHO, for you to read the man pages on chown()
and chmod() and then experiment by changing to different
users (to get a flavor for how it actually works.)