This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How to add user into group, and make changes take effect *without logout/login*: the *newgrp* command | |
# | |
# Do note that this method will only update the groups, in the current shell session (and its child-processes). | |
# New shell sessions will not have the groups updated - either use this method to update the groups in each shell | |
# session, or logout/login to make the group update permanent by default | |
# | |
# In short: | |
# $ sudo adduser user_x my_grp | |
# $ newgrp my_grp && newgrp | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ACTION=="add", SUBSYSTEM=="block", SUBSYSTEMS=="scsi", ATTRS{model}=="WDC WD20EARX-00P", SYMLINK+="BACKUP", RUN+="/bin/mount /mnt/backup" | |
ACTION=="remove", SUBSYSTEM=="block", SUBSYSTEMS=="scsi", ATTRS{model}=="WDC WD20EARX-00P", SYMLINK+="BACKUP", RUN+="/bin/umount -l /mnt/backup", RUN+="/usr/local/bin/stop-disk /dev/%k" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ACTION=="add", SUBSYSTEM=="block", KERNEL=="[sh]d[a-z]", RUN+="/etc/init.d/hdparm hotplug" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#place this script to /usr/local/bin/stop-disk | |
if [ "" = "$1" ]; then | |
echo "Usage: `basename $0` device" | |
else | |
umount -l $1 | |
#extract the SCSI ID numbers from the output of lsscsi: | |
read -d ] A B C D < <(IFS=':'; echo $(lsscsi | grep $1)) | |
#remove the "[" from begining of A: | |
A=${A##*[} #quicker version: A=${A:1} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### user1 létrehoz egy fájlt: | |
user1@teszt:~$ touch enyime | |
### ha azt szeretnéd, hogy user2 is írhasson a fájlba, de nem akarod a csoportokat vagy az umaskot piszkálni, akkor így is adhatsz jogot: | |
user1@teszt:~$ setfacl -m u:user2:rw enyime | |
user1@teszt:~$ getfacl enyime | |
# file: enyime | |
# owner: user1 | |
# group: user1 | |
user::rw- | |
user:user2:rw- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+auto.master | |
/smb /etc/auto.smb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
key="$1" | |
for P in /bin /sbin /usr/bin /usr/sbin | |
do | |
if [ -x $P/smbclient ] | |
then | |
SMBCLIENT=$P/smbclient | |
break |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sales_dsehk | |
dailyappliance2010 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
KEY=/etc/bind/Kize.domain.hu.+111+11111 | |
SERVER=1.2.3.4 | |
ZONE=domain.hu | |
HOSTNAME=ize | |
ddns_setup_set() { | |
if [ "$interface" != "eth0" ] && [ "$new_ip_address" = "$old_ip_address" ]; then | |
return | |
fi | |
( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Template used to create this container: debian | |
# Checksum of the template script (SHA-1): b7ad0dbfed857c24568c74ebeabd093a498ad251 | |
# /var/lib/lxc/template/config | |
## Container | |
lxc.utsname = template | |
lxc.rootfs = /var/lib/lxc/template/rootfs | |
lxc.arch = x86_64 |