Password Protected Directories
Is it possible to password protect individual directories without having to define multiple users?
I'm using Mandrake 8.2.
Any help would be much appreciated.
If you don't understand my explanation at first, please read the manpages of the commands I listed at the bottom.
If you just want to password-protect a directory, then set its group to, say, "private". You will also need to create a password-protected group with the same name first. Also make sure the world permissions on that directory are set to 0 or "o-rwx" (i.e. no permissions). The group permissions should be set to 5/"g+rx-w" (read-only) or 7/"g+rwx" (full access).
Then, to access the protected directory, instruct your users to switch to the "private" group using the "newgrp private" command, which will prompt them for the password of the group "private". Once the user switched to the group "private", he/she will have access to the protected directory. Do not add any users to that group. If a user is listed as a member of a group, he/she can switch to that group without a password.
Here's an example of a procedure (has to be done as root):
To create a new group, see groupadd.
To set the group password, see gpasswd.
To change the permissions on directories and files, see chmod.
To change the ownership of (the user and group that owns) the file/directory, see chown.
To switch groups, see newgrp.
To see what groups you belong to, see id.
I always wondered if there is a way to do that through samba?
for windoze users, but I guess it isn't
|All times are GMT -5. The time now is 08:57 PM.|