How to create a user in linux with admin rights.
How to create a user in linux with admin rights. i have tried to create a sudo user.but i t not meets my requirement.. Please some one give me solution
|
What are your requirements, and why doesn't sudo meet them?
|
Sudo is just for switching from user to root. but i want a user to access total file system not as a root
|
Quote:
Sudo is for executing a command as another user. Most commonly, root. "man sudo". The best solution i can think of, would be to add $username to the root group. Which isnt going to work for anything that has x00 permissions Why are you trying to achieve this? Giving an unprivileged user "full" filesystem access, defeats the point of having a super user in the first place. |
Is it possible to give access on whole file system, user should have only read permission .
|
What can't you access as a normal user that you think you should be able to?
|
Well, I see the OP didn't get a straight answer so here you go. As root edit /etc/passwd. Find the line with the user name you want to use with root privileges. Change it thusly:
username:x:0:0:root:/home/username:/bin/bash Notice I've substituted whatever user name you want with "username". Notice also the home directory. It is /home/username. Use whatever directory your user name in place of "username" there. This will give that user name root privileges. Oh, and you have to reboot. Or just log out and log back in as that user. Let us know if you have any problems. |
How does this,
Quote:
Quote:
|
Depends on the distro. By security features some do not allow a root user to log on. It is pretty foolish to allow or use a root account from log on.
If you insist then use su and not sudo. su is switch user. It can be any user. su mark or su root or such. Your admin account may not be root in fact. sudo is to do a task as root. It is really a poor practice to use su to root. Any time you are on that account, any other malware can run. sudo limits that greatly. |
Quote:
|
in a multi user office using "su -" is not a good idea for EVERYONE to use ( you have to give out the root pass to MANY people - not good)
sudo is a better choice but a single user or when there is only one Admin then su - is a good choice use the best set up for the situation also no other user should be set up as a second root there is a reason this is not set up by default . |
Quote:
|
Quote:
|
Quote:
|
Linux best practices are not nonsense. You can do what you want but anytime a user is logged on a su there is a chance of malware or other attacks even if you don't believe in it.
|
All times are GMT -5. The time now is 04:01 AM. |