Serial Port configuration in RHEL
-
@Nimika said in Serial Port configuration in RHEL:
RHEL is not allowing any other user to add in dialout group.
cant you just use sudo in front?
-
@Nimika RHEL works like any other Linux distribution. To add a user to a group you need to be root. You can either login as root, or just enter su in a terminal window enter your root password and then add the user to the group. su is used to become root in a shell (you need root password).
@mrjj I think on RHEL sudo is usually not used, so sudo will probably not work (as far as I know, I could be wrong as I use Ubuntu). -
@Nimika So, is your user now member of dialout group? You can check this executing "groups" command in a terminal (not as root but as the user who needs the access rights!). You can add a user to a group manually: open /etc/group file in an editor (as root), look for a line like "dialout:x:115:" and append user name at the end of that line.
-
In addition to what my fellows already wrote, if you're not too found of manipulating your user setting with the command line, most of desktop environment (KDE, Gnome, etc.) provide user management software so you'll likely be able to add your user to the
dialout
group with them. They should ask for an admin password when required. -
@jsulm
Oh, you are right. it might not be set up at all
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux_OpenStack_Platform/2/html/Getting_Started_Guide/ch02s03.html
so su is the way to go. -
-
@Nimika Sorry, I don't understand. To add a user manually you open /etc/group file in a editor (you need to be root to edit this file). Look for the group "dialout" and append the username at the end of the line containing the group, like:
dialout:x:124:myuser
This is how it works on UNIX/Linux since decades.
"it is showing that this user is already have the group" - what/who is showing this?So, here what you should do:
$ su ENTER YOUR ROOT PASSWORD $ vim /etc/group APPEND USERNAME AT THE END OF THEdialout LINE SAVE THE FILE CLOSE vim
You can use another editor instead of vim.
-
Some admins do not like you to cross groups (Like US GOV admins). You can, however, get them to make a UDEV rule that will set the permissions when the port is found. This is especially useful if you need many users to access the port.
This is a more permanent solution than using rc.local to change port access modes as it will set the modes each time the port is plugged-in as well as when the computer is rebooted. Your admin should know how to do this. If you are the admin, there are plenty of technotes on adding rules to UDEV. You can even give the port a better, more consistent, name the ones the kernel provides as they can reorder at reboot, etc.
In
/etc/rules.d/my.rules/etc/udev/rules.dSUBSYSTEM=="tty", ENV{ID_PATH}=="pci-blah blah blah", MODE="0666", SYMLINK+="tty-my-device"
The "pci-blah blah blah" can be found using udevadm info /dev/tty<device>