I’m trying to add all users on system to group “dialout”, I need this to an application works because the app uses the USB/SERIAL and the users need permission to read/write on this devices.
So to not need run the app using “root” I need to add all users to “dialout” group…
How can I do that with shell script?
I have one who works very well on Debian/Ubuntu, as you can see:
The same script should work on openSUSE as /etc/passwd is the same and
user id’s start with 1000 which is also the same and also dialout is the
same group here as in Debian.
–
PC: oS 12.2 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.5 | GTX 650 Ti
ThinkPad E320: oS 12.2 x86_64 | i3@2.30GHz | 8GB | KDE 4.9.3 | HD 3000
eCAFE 800: oS 11.4 i586 | AMD Geode LX 800@500MHz | 512MB | lamp server
linux-a63j:/home/dvl/Documents/inove-bevsat-1.0.0 # ./permission.sh
usermod: Too many arguments.
Try usermod --help' or usermod --usage’ for more information.
usermod: Too many arguments.
Try usermod --help' or usermod --usage’ for more information.
Am 20.11.2012 18:16, schrieb dcbasso:
>
> I not sure yet if is working but I remove the parameter -G and not error
> is showing!
>
>
that’s correct, sorry I missed that the usermod differs from debian, so
I have not paid attention to the options you passed to it. The -A option
adds the user to additional groups, that’s fine.
Did you test a user to see if it worked?
–
PC: oS 12.2 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.5 | GTX 650 Ti
ThinkPad E320: oS 12.2 x86_64 | i3@2.30GHz | 8GB | KDE 4.9.3 | HD 3000
eCAFE 800: oS 11.4 i586 | AMD Geode LX 800@500MHz | 512MB | lamp server
I repeat what is said earllier here. You should of course read the man page of such a tool first (not only, or not all, the --help).
You cannot expect us to check all those opetions for you when you show us a script with such an awk statement. People will naturaly try to check the logics behind the awk statment, but not check if you forgot to read the man pages.
OK!
I just not undestand so much differences between the usage on Debian and OpenSuse…
THis kind of things should user some pattern, it will make easier to developer and for some users too!
dcbasso wrote:
> OK!
> I just not undestand so much differences between the usage on Debian
> and OpenSuse…
> THis kind of things should user some pattern, it will make easier to
> developer and for some users too!
Agreed, absolutely. Unfortunately, user management is one area that
differs quite a lot between distros. package management is another,
probably better known such area.
On package management, if some day appear one that can run on all distros will be nice!
Like, the distros could still using .rpm/.deb but has another one open, secure, multiplatform… That’s only one Idea!
I look for something like this and I don’t find nothing like this.