How to add a role and profile to new user in LINUX
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.
The useradd command also exists on Linux but it's generally used to create users, not modify them. For that in Linux you can use the usermod command. Have a look at the man pages of both to find the possible attributes to them. In a terminal type:
The useradd command also exists on Linux but it's generally used to create users, not modify them. For that in Linux you can use the usermod command. Have a look at the man pages of both to find the possible attributes to them. In a terminal type:
Code:
man useradd
man usermod
Hope that helps.
Kind regards,
Eric
Hi Eric Thanks, and sorry my question may be very stupid and basic.
My doubt is...
In solaris "useradd -R" will add a new role to the user and "useradd -P" will add a new profile to the user. But in linux these options are not availabe, so how to achieve these options in LINUX.
You're welcome and there are no stupid questions in my opinion, so don't worry about a thing.
As stated in my answer to your other thread, I'm not aware of a 'role' being used in Linux, at least not within a standard Linux system. I've read (Google) that role based access control is something that can be used for example in SELinux or in other distros like Gentoo using Grsecurity but I'm not familiar with either of them. Standard Linux doesn't use the role based access/authentication control so I'm afraid that unless your software works with things as SELinux, you'll have to work with an alternative to the role based system like group based for example, or sudo.
As you stated; the options -R and -P are not available in the useradd command, at least not in the version I have running with Slackware 13.1.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.