
Custom Search
Users and Groups Administration
Posted by
Kshatriya Naveen Kumar
You can most simply create a new user using YaST’s user module. Start YaST and choose the users and groups option. You might want to create a user with the username guest and the real name Guest User. YaST will create the user according to your instructions and also create a home directory /home/guest for the new user with a skeleton of configuration files in it.
This skeleton is copied from the directory /etc/skel but has the ownership of the new user (user guest, group users) applied to it once the new user’s home directory has been created.
You can also create a new user from the command line with the command useradd. The equivalent command would be:
# useradd -m demouser -c “Demo User”
In a similar way, you can create or modify groups through YaST, and there are equivalent
command-line commands called groupadd (to add groups) and groupmod (to
modify existing groups
Ownership and Permissions
✦ rwx means permission to read, write, and execute
✦ r-- means permission to read but not to write or execute
✦ r-x means permission to read and execute but not to write
Examples :-
ls -l screenshot1.png
-rw-r--r-- 1 roger users 432686 2004-0 5-17 20:33 screenshot1.png
-rw-r--r-- 1 roger users 432686 2004-0 5-17 20:33 screenshot1.png
This file can be read and written by its owner (roger), can be read by members of the group users, and can be read by others.
ls -l /home/roger/afile
-r-------- 1 roger users 0 2004-0 5-17 21:07 afile
-r-------- 1 roger users 0 2004-0 5-17 21:07 afile
This file is not executable or writable, and can be read only by its owner (roger). Even roger would have to change the permissions on this file to be able to write it.
ls -l /bin/mount
-rwsr-xr-x 1 root root 87296 2004-0 4-06 14:17 /bin/mount
This is a more interesting example: notice the letter s where until now we saw an x. This indicates that the file runs with the permissions of its owner (root) even when it is executed by another user: Such a file is known as being suid root (set user ID upon execution). There are a small number of executables on the system that need to have these permissions. This number is kept as small as possible because there is a potential for security problems if ever a way could be found to make such a file perform a task other than what it was written for.
ls -l alink
lrwxrwxrwx 1 roger users 8 2004-0 5-17 22:19 alink -> file.bz2
Note the lin the first position: This is a symbolic link to file.bz2 in the same directory.
lrwxrwxrwx 1 roger users 8 2004-0 5-17 22:19 alink -> file.bz2
Note the lin the first position: This is a symbolic link to file.bz2 in the same directory.
Changing Ownership and Permissions.
You can change the ownership of a file with the command chown. If you are logged in as root, you can issue a command like this:
#chown harpo:users file.txt
This changes the ownership of the file file.txt to the user harpo and the group users.
To change the ownership of a directory and everything in it, you can use the command with the -R (recursive) option, like this: chown -R harpo:users /home/harpo/some_directory/
The chmod command is used to change file permissions. You can use chmod with both the numerical and the rwx notation we discussed earlier in the chapter. Again, this is easiest to follow by looking at a few examples:
✦ chmod u+x afile—Adds execute permissions for the owner of the file
✦ chmod g+r afile—Adds read permissions for the group owning the file
✦ chmod o-r afile—Removes read permission for others
✦ chmod a+w afile—Adds write permissions for all
✦ chmod 644 afile—Changes the permissions to 644 (owner can read and write; group members and others can only read)
✦ chmod 755 afile—Changes the permissions to 755 (owner can read, write and execute; group members and others can only read and execute)
If you use chmod with the rwx notation, u means the owner, g means the group, o means others, and a means all. In addition, + means add permissions, and - means remove permissions, while r, w, and x still represent read, write, and execute, respectively. When setting permissions, you can see the translation between the two notations by executing the chmod command with the -v (verbose) option. For example:
chmod -v 755 afile
mode of `afile’ changed to 0755 (rwxr-xr-x)
chmod -v 200 afile
mode of `afile’ changed to 0200 (-w-------)
Using umask
When a user creates a file, it is created with certain permissions. You can create an empty file with the touch command:
#touch newfile
If you then list the file, you will see something like this:
#ls -l newfile
If you then list the file, you will see something like this:
#ls -l newfile
-rw-r--r-- 1 roger users 0 2004-05-18 10:00 newfile
So the file has been created with the permissions 644. What controls the permissions with which a new file gets created is something called the umask. By default on a SUSE system, a normal user’s umask is 022, which means that the permissions for a new file added to 022 will make 666, while the permissions for a new directory added to 022 will make 777.
Subscribe to:
Post Comments (Atom)
Cheapest predictive dialer for callcenter power dial
Power Dial predictive dialer for callcenter with less investment and more features based in the heart of Hyderabad AP India.Power Dial has setup more then 200 centers and more then 5000 seats supports is provided.
For best quotes, pricing and other details mail me asap at powerdial.hyd@gmail.com
Vivaan Kumar
http://powerdial.blogspot.com/
Cheapest Predictive Dialer power Dial
cheap pd power dial
predictive dialer
predictive dialer for callcenter with less investment power dial
predictive dialer for callcenter with low price
predictive dialer form india
predictive dialer from hyderabad
power dial predictive dialer
For best quotes, pricing and other details mail me asap at powerdial.hyd@gmail.com
Vivaan Kumar
http://powerdial.blogspot.com/
Cheapest Predictive Dialer power Dial
cheap pd power dial
predictive dialer
predictive dialer for callcenter with less investment power dial
predictive dialer for callcenter with low price
predictive dialer form india
predictive dialer from hyderabad
power dial predictive dialer
Post a Comment