Monthly Archives: March 2018

ACL in Linux

This is a quick howto setup acl on Linux.

Sometimes we run into issue when we only wish to give certain user certain sets of permission and deny the rest. Simple rwx permission are not suffice in such situation therefore we use acls.

Setup ACL:
setfacl -R -m u:salman:rwx secret/
The above will set acl on directroy secret for user salman with read, write and execute permission recursively.

To View ACL:
getface secret
# file: secret/
# owner: apache
# group: apache
user::rwx
user:salman:rwx
group::rwx
mask::rwx
other::r-x
So we can clearly see that although the owner is apache, user salman have full permissions as well.

Thanks for Reading.
Join our FaceBook Group LHZProject “Linux Zero To Hero”
YouTube: www.youtube.com/linuxking

SSH Issue with Cisco Switch

So Today i wanted to login to my old Cisco Switch 2960 from my Suse Linux when i received the following error:

ERROR:
Unable to negotiate with 10.1.1.1 port 22: no matching key exchange method found. Their offer: diffie-helman-group1-sha1
Note**: 10.1.1.1 is ip of my switch with username salman

SOLUTION:
1) Make sure you configure ssh keys with 1024 bits when setting it up in the switch
2) From your Linux machine issue the following command:

# ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 salman@10.1.1.1

Tip**: For Debugging SSH,  use ssh -vvv option.

Thanks for Reading

Join our FB Linux Group LZH
https://www.facebook.com/groups/LZHProject
Subscribe to our YouTube Channel
https://youtube.com/linuxking