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.
I want to see the users list and the permissions of the users when i logged in a root and how to change the permissions of the users.
2.How to change the permissions for the commands.
example:when i logged with my other user account(not with root user) i dont have a permission to use the move(mv) command.
#mv filename /backup
my error : Permission denied.
I need to know how we can set the permissions for the commands even.
Thanks in advance.Please reply me as soon as possible,even u can reply for this id sandhya.531@gmail.com toooooooo
I want to see the users list and the permissions of the users when i logged in a root and how to change the permissions of the users.
Here the only user with all permissions is root . So when u give the command "getent passwd " you get the user details .
And when you give cat "/etc/group" you can see the group root and the groups of users you created . this implies who ever is in the group root as same access as like root, I guess it will not be there in your case. and all other users have no permissions like of root....
correct me if I'm wrong about this And coming to the permissions change thing i guess you can change the permissions availed by a user regarding adminstration stuff by giving him sudo access ( which i dont know exactly how its done) or if u want to give him direct acess then change his group i mean adding the secondary group.
Quote:
Originally Posted by sandhyasharma
2.How to change the permissions for the commands.
example:when i logged with my other user account(not with root user) i dont have a permission to use the move(mv) command.
#mv filename /backup
my error : Permission denied.
This happend becos u performed a operation in the / directory for which user has no access. the only directory users have access is /home/<username> directory . for that directory only he has full permissions
Quote:
Originally Posted by sandhyasharma
I need to know how we can set the permissions for the commands even.
This can be done by copying the commands in /sbin to /bin mostly it will do the trick
for example u take a command xyz when u give the command #whereis xyz you get the locations of all the files related to that xyz. so if it is in /sbin then it can only be executed by root if it is in /usr/sbin it can be accessed by users with sudo access and if it is in /bin then user can execute that ...
and if u talk about permissions there are many more things about it
Hi,
Here the only user with all permissions is root . So when u give the command "getent passwd " you get the user details .
And when you give cat "/etc/group" you can see the group root and the groups of users you created . this implies who ever is in the group root as same access as like root, I guess it will not be there in your case. and all other users have no permissions like of root....
correct me if I'm wrong about this And coming to the permissions change thing i guess you can change the permissions availed by a user regarding adminstration stuff by giving him sudo access ( which i dont know exactly how its done) or if u want to give him direct acess then change his group i mean adding the secondary group.
Wrong...that command doesn't give you user details...you're getting a list of users, and the same information you can get with "cat /etc/passwd". It doesn't tell you anything about the user permissions.
If you want to change the user permissions, you can add/remove them from groups, which will then have rights/access to different commands/directories, depending on how you set your system up.
Quote:
This happend becos u performed a operation in the / directory for which user has no access. the only directory users have access is /home/<username> directory . for that directory only he has full permissions
Wrong. Users have access to a wide variety of system resources/directories, not just /home/username. That particular user may not have WRITE access to that directory, but may be able to read/execute things just fine. Doing an "ls -l" on a file/directory will tell you who owns it, and what the permissions are.
Quote:
This can be done by copying the commands in /sbin to /bin mostly it will do the trick
for example u take a command xyz when u give the command #whereis xyz you get the locations of all the files related to that xyz. so if it is in /sbin then it can only be executed by root if it is in /usr/sbin it can be accessed by users with sudo access and if it is in /bin then user can execute that ...
This is very, VERY bad advice. First, things are in /sbin for a REASON...copying them elsewhere is a bad idea, and may not make them functional by others..some programs can only be run as root, so copying them elsewhere is pointless. Second, those commands are there because 'regular' users shouldn't be able to run them...you are inviting someone to damage your system, by running things they're not skilled enough to touch. Set users up in sudoers, so you can run root level commands if needed...that's why sudo was invented to start with.
Quote:
and if u talk about permissions there are many more things about it
Hope this clarified your doubt.
regards,
Why didn't you then explain about permissions, and how to check them?? Read the man pages for "ls -l" (check permissions on files/directories), chmod (change permissions), and chown (change ownership).
Also, to rajasekhar19489 and sandhyasharma, spell out your words, and write clearly. That text speak garbage ("becos", "u", etc.) is against LQ rules. And folks are not going to email you answers to your questions....
Wrong. Users have access to a wide variety of system resources/directories, not just /home/username. That particular user may not have WRITE access to that directory, but may be able to read/execute things just fine. Doing an "ls -l" on a file/directory will tell you who owns it, and what the permissions are.
and for the question about the mv command I was explaining regarding the situation that was explained i know that users also have access to some other directories/files/commands on the system. and sorry for not explaining that.
And I want to know where u can change the sudo access for a user (i want it to be done in CLI mode).
Regarding the first question the user asked i was saying the same thing the passwd file will give you details about the users regarding the groups he belongs to by which you can tell about the users access to the directories/commands/files in the system
Yes I forgot to mention about the man pages.
Really sorry TBONE i was very dumb writing the reply to the question
And i would like to know about giving sudo access to users
Tbone,
Thankyou for pointing my mistakes and for the question about the mv command I was explaining regarding the situation that was explained i know that users also have access to some other directories/files/commands on the system. and sorry for not explaining that.
And I want to know where u can change the sudo access for a user (i want it to be done in CLI mode).
Again, SPELL OUT YOUR WORDS. And again, check the man pages. "man sudoers" will pull it up, and there are many examples on the web you can easily find via Google, if you tried to look.
Quote:
Regarding the first question the user asked i was saying the same thing the passwd file will give you details about the users regarding the groups he belongs to by which you can tell about the users access to the directories/commands/files in the system
No, you can't. All it will show you is VERY basic user stats. It does not show you the group(s) the user is in, or what rights those groups have.
Quote:
And i would like to know about giving sudo access to users
Great. Read the man pages for sudo/sudoers, or check Google.
Also, to rajasekhar19489 and sandhyasharma, spell out your words, and write clearly. That text speak garbage ("becos", "u", etc.) is against LQ rules. And folks are not going to email you answers to your questions....
I thought text speak was one word as in text-speak.
It's obvious that English isn't their mother tongue. They probably think this is normal.
I don't remember sandhya sharma using "that_text-speak garbage" - at least in this thread.
OK
Last edited by AnanthaP; 12-24-2010 at 11:23 PM.
Reason: Straight - no pre cog.
I want to see the users list and the permissions of the users when i logged in a root and how to change the permissions of the users.
2.How to change the permissions for the commands.
example:when i logged with my other user account(not with root user) i dont have a permission to use the move(mv) command.
#mv filename /backup
my error : Permission denied.
I need to know how we can set the permissions for the commands even.
Thanks in advance.Please reply me as soon as possible,even u can reply for this id sandhya.531@gmail.com toooooooo
BY default root has all permission. A user has permission to run
PHP Code:
mv
command, but here in your case you maynot have permission to /backup directory. You can check the details of permission of the /backup by
PHP Code:
getfacl /backup
Then you can get the ownership details of the directory. Here you can see wheather your other user account have permission on this /backup or not. If do not have the permission just add your user account to the group owner or you can separately add permission to /backup with
PHP Code:
setfacl.
And the case of commands, you shouldnot change the permission of the comands. If you want to grant some commands can be executed by your other user account you can specify that in
PHP Code:
/etc/sudoers.
And if you want to access all the commands from other user acoount, then add your user account to the group root.
Last edited by divyashree; 12-25-2010 at 12:48 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.