filesystem
HowTo: Manage Sudo users commands and previleges
If you want to prevent users from executing a specific command have a look at this.
ssh ALL=(user1) ALL, !/usr/bin/passwd
Add users and use specific commands
#includedir /etc/sudoers.d User_Alias JAVATEAM = fileupuser Cmnd_Alias JUSERCMD =/etc/init.d/tomcat,/usr/bin/tail JAVATEAM ALL = NOPASSWD : JUSERCMD User_Alias ADMINTEAM = innouser Cmnd_Alias SYSTEM =/sbin/service,/usr/sbin/ss,/bin/df,/usr/bin/du,/usr/bin/top,/bin/netstat,/usr/sbin/lsof,/bin/ps,/sbin/chkconfig Cmnd_Alias FILEM =/bin/zcat,/usr/bin/tail,/bin/cat,/bin/grep Cmnd_Alias
COMPRESS =/usr/bin/unzip,/usr/bin/bzip2,/usr/bin/zip,/bin/tar ADMINTEAM ALL = NOPASSWD : SYSTEM,FILEM,COMPRESS
this could be understand the logic easily.
HowTo: Mounting HFSplus filesystem in centos6
hfsplus (Hierarchical File System) is a file system which is developed for MAC OSX , In some of the cases we have to mount is different operating system. I followed this method which is simplest way to mount using epel package repo., http://elrepo.org/tiki/tiki-index.php.
Installaing Repository to the Centos:
# sudo yum install epel-release
Installing necessary package:
# yum install kmod-hfsplus
Now you can get the block dev informations from the Kernel log
# tail -f /var/log/messages
Jan 7 06:59:44 test kernel: sd 5:0:0:0: [sdc] 1953525167 512-byte logical blocks: (1.00 TB/931 GiB) Jan 7 06:59:44 test kernel: sd 5:0:0:0: [sdc] Write Protect is off Jan 7 06:59:44 test kernel: sd 5:0:0:0: [sdc] Assuming drive cache: write through Jan 7 06:59:44 test kernel: sd 5:0:0:0: [sdc] Assuming drive cache: write through Jan 7 06:59:44 test kernel: sdc: sdc1 sdc2 ---> these are the block devices to mount Jan 7 06:59:44 test kernel: sd 5:0:0:0: [sdc] Assuming drive cache: write through Jan 7 06:59:44 test kernel: sd 5:0:0:0: [sdc] Attached SCSI disk Jan 7 07:05:14 test kernel: EXT4-fs (sda3): warning: checktime reached, running e2fsck is recommended
Now mount the devce :
# mount /dev/sdc2 /media/disk2
For more information about the disk file system use command blkid