Pages

Linux User Managemenet and File Permission Ownerships

User Management and file permissions / ownerships :
To add a new group called mailusers use:
[root@mainserver /]# groupadd mailusers
To add new user kamran and make him a member of the group mailusers, use:
[root@mainserver /]# useradd -s /bin/false -g mailusers kamran
To change the password if some user, say kamran, run the following command as
root:
[root@mainserver /]# passwd kamran
To lock the password of user kamran, run the following command as root:
[root@mainserver /]# passwd -l kamran
To un-lock the password of user kamran, run the following command as root:
[root@mainserver /]# passwd -u kamran


To delete a user say kamran, including his home directory, use:
[root@mainserver /]# userdel -r kamran
To change permissions of an object (file or directory), use chmod:
[root@mainserver /]# chmod 770 myfile.txt
(changes the permissions of the file to rwx for both owner and group)
or
[root@mainserver /]# chmod ug+rwx,o-rwx myfile.txt
To change ownership of a directory /project to kamran and set the group
permissions to the group mailusers, use chown (-R will change ownership of all files
and subdirectories under the directory project:
[root@mainserver /]# chown –R kamran:mailusers /project
For more topics like sudo, umask and setgid, etc, see the chapter, Advance
permissions
Modules management :
To insert a module, eg. you want to add the support for your 3com Ethernet card
3c509 ,then use :
[root@mainserver /]# modprobe 3c509 io=0x300 irq=5
or
[root@mainserver /]# insmod 3c509 io=0x300 irq=5
then
[root@mainserver /]# ifconfig eth0 192.168.1.5 netmask 255.255.255.0 up
To list the currently loaded modules use :


[root@mainserver /]# lsmod
To remove a module use :
[root@mainserver /]# rmmod 3c509

Forex Trading