Serial Port configuration in RHEL
-
-
Please tell me how to add my normal user to the dialout group?
sudo usermod -a -G dialout theuser -
What is dialout group?
Its a predefined group found in many distros.
From old times it was used to allowed modems
to make connection etc. ( ie allow the user to connect to the internet :)
So often the system has this group and any user in it, have access to /dev/ttySX
-
-
@Nimika
Np. as far as I can see it's the same for Red Hat with ttySX access, so there is
tons on google on the topic on allowing user X to read and write to /dev/ttSxxx
stuff.
http://ithelpblog.com/os/linux/bashandscripts/howto-add-user-to-group-on-linux-redhat-rhel-centos-fedora/ -
@Nimika
Hi
Any user can be granted access to /dev/X devices.
Often it is done via the dialout group as its already assigned to serial devices such as ttyS0 and
any user that is member of that group can use it.
so often
sudo adduser TheUserName dialout
and and reboot is all that is needed.
Adding user to group might have slightly different syntax on RH but concept and rights are 100% the same.:)
http://websistent.com/fix-serial-port-permission-denied-errors-linux/ -
@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.