[SOLVED] A true newbie trying to do a UDEV command, need help
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
A true newbie trying to do a UDEV command, need help
Here is my problem, UDEV rules. I know nothing about how to to them, or how to get to them. So, how to I navigate and browse to the path, as this help desk person tells me? Is it with a terminal window? This problem is referencing in getting a bitcoin wallet to work. Below is what instructions I was given. I do not know how ot get to the paths as instructed. Please help.
-----------------------
Hello there,
Sorry for the confusion. Basically you will need to browse to this path: /etc/udev/rules.d/51-usb-keepkey.rules and edit the "51-usb-keepkey.rules" and add the rules written below:
OK, so I figured out how to get to the udev/rules.d folder. Now what, how or what do I create in this folder? I tried to create a new file, but it is grayed out and wont let me save.5
I also found this alternative method. Is this safe, I dont know who/what python is.
SSH KeepKey Configuration with Ubuntu (Linux)
Drew Dapp
1 year ago Updated
To setup KeepKey SSH Login with Ubuntu (Linux), here are the following steps:
I. Install Python-Dev Python-Tools Libusb-1.0.0-dev Libudev-dev and Git.
Open Terminal.
Enter following command: sudo apt-get install python-dev python-setuptools libusb-1.0-0-dev libudev-dev git
II. Install Pip.
Open Terminal.
Enter following command: sudo easy_install pip
III. Install Trezor Python Client.
Open Terminal.
Enter following command: sudo pip install trezor
IV. Install Trezor_Agent SSH.
Open Terminal.
Enter following command: sudo pip install trezor_agent
V. Generate SSH Public Key using trezor-agent.
Open Terminal.
Enter following command: trezor-agent user@sshserver (user - user name and sshserver is server name)
Enter PIN.
VI. Copy ECDSA key into Authorized Keys on SSH Server
Log into SSH Server
Copy ECDSA Key that was created from the previous step
Paste into ~/.ssh/authorized_keys file on your SSH Server
VII. Login into SSH Server using your KeepKey
Open Terminal
Enter following command - trezor-agent -c user@sshserver (user - user name and sshserver is server name)
Enter PIN
Hold KeepKey button for 2 seconds to authenticate
Hi pan, I guess I do not know how to text edit. I have a file in there now, but it is not named correctly, it wont let me change the name as instructed,or remove some irrelevant stuff I saved into the file such as
# KeepKey: Your Private Bitcoin Vault
# http://www.keepkey.com/
# Put this file into /usr/lib/udev/rules.d or /etc/udev/rules.d
I assume I do not want that stuff in there, just the stuff instructed afterwards?
If so, I still cannot save it, or save as to /etc/udev/rules.d/51-usb-keepkey.rules , as instructed. I do not have permissions?
Sorry if my post sounds rambling, it is all new to me.
Leave python alone for the time being. Adding udev rules can be tricky so do it the simplest way, with a plain text edit. As pan64 said, you will need to become root, which is best done with sudo. So:
Code:
sudo nano /etc/udev/rules.d/51-usb-keepkey.rules
I suggest you put this into the /etc version of the udev rules directory rather than the /lib version because the /etc version has overriding authority. It's specifically intended for system administrators to put their own rules into.
Once you are in nano, enter the text of the new rules exactly as given. Then write the file out and exit (I believe that's done with ctrl-o ctrl-x, but in any case you'll see the command codes at the bottom of the edit window).
PS: I see Pan also favours using the /etc file. His invocation of sudo is just an alternative: it gives you an interactive root shell and then you can carry out several operations as root. But if you do that remember to exit the root shell afterwards!
Last edited by hazel; 01-06-2020 at 09:55 AM.
Reason: Added postscript
I am thinking, OK, I am close, but it has those first 3 lines in it that I am guessing are irrelevant, and the it is named improperly... if that is important, I am not sure.
So, I am trying to resave that file with those first 3 lines removed, and with the as instructed name of 51-usb-keepkey.rules.
I do not know if what I just wrote even makes sense, but trying to explain exactly where I am at, and what I am guessing to do next?
Ok, I was writing so fast, I did not see the suggestions. I saw Hazels first, so tring that first. I have a file, correct I think now, saved in the correct folder. I have to pull out my device, and see if it works. Standby and thank you to everyone.
The lines beginning with # are comments. It is always a good idea to have comment lines in a system file. Otherwise, if you come back to this file in three months' time, you won't know what the heck it is. So I would keep them in place if I were you.
The name of a udev rules file doesn't actually matter as long as it ends with .rules, but again, it makes sense to give it an informative name rather than something meaningless like "my first udev rules"!
You have now learned several useful lessons:
1) Linux configuration files are all plain text. There is no binary registry like Windows has.
2) All these files can, in principal, be modified by the root user.
3) You can become root by using the sudo command.
4) Modifying configuration files is potentially dangerous, so don't do it without being sure you know what you are doing.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.