In linux,who can be a root user? [closed] - linux

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I were using windows but now I am shift to unix like os sucn as linux,fedora .Now I am confused what is root in linux os?Please explain me.

Root user is also known as superuser in Linux-based OS. Basically, root user is granted all permission to do various task on that system. This includes adding/removing normal user account, managing services, changing ownership of files/folder and many more.
Normally, it is recommended for system administrator to create another normal user account to perform day-to-day operations while root account should only use when necessary. Once the system administrator has completed the necessary task, he/she will then revert back to their normal user account immediately. It is because a mistyped of command using root account might lead to wiping all data in the system!
For more information about root, you can visit here and here. Hope it helps.

Related

Login as root with two different passwords [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Is it possible to login via ssh on a linux machine, using one of two (or more) passwords set for root?
I want a primary password that I will change it frequently but in a case of emergency I want a "backup" password that will log me in. I hope that I stated the question clear. ;)
Don't use root accout. Use sudo.
When you configure sudo for your ordinary account, you can change root password to something complex and use sudo for normal daily work.
When something breaks, you will login to root with the complex password.
You can create multiple accounts that have userid 0, each with a different password. What matters for permissions is the userid, not the name.
However, there are some scripts that may check whether you're running as root, and they might check the login name rather than the ID. But if you're just using the backup account for emergency purposes, these glitches should not be a problem.
Disable the root login via ssh and create two user accounts, one for myself and a default account (which is there on all my machines with limited sudo access) with sudo access for both is what I do.
If it's all about ssh, then you can use keybased authentication, rather than password based auth.
This way, two (or more) users can login (as root, as a given user) without having to share the password.

Access denied for files owned by apache [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am trying to migrate data from onw of my VPS to another. The problem is, for the VPS from where I am moving the files, I don't have root access, and most of the user uploaded content in there are owned by apache, and hence when I tried rsync I got access denied. I tried chown from the account I do have access to, but it seems that account can't change the owner of those files(but I might be doing it wrong as well, since I am new to SSH. So please tell me the correct syntax to recursively change ownership of all files within a folder and subfolders. I tried chown -R dirname/*). So is there any other way to move these files?
Also, if I reset the password(I am on godaddy linux-VPS), will it affect my site or cause any downtimes? If I get root access, will it help in this matter?
Resetting your password on your Go Daddy Linux VPS should not cause any downtime. The password reset should just change the user and root passwords. Once you are logged in to the server as your user you will then use the "su" command to change to the root user. You cannot log in directly as root. The command will look like this:
#su -
Once logged in as root you should be able to do the rsync without issues.

Root user on linux-based embedded systems [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm involved in the task of creating a root filesystem for Beagleebone running Linux. Usually the filesystem is generated and configured with a single root user (for example with buildroot), which is the only user of the system. Does it mean that all the commands and applications are executed with root privileges (being that the only user of the system)? Isn't this a security issue? Would it be better to create a non-root user? What is the usual practice?
In a linux system there are many system users apart from root which may be used for specific purposes. If your embedded system is some kind of autonomous system (eg. a robot) and doesn't expose any services on a network or some kind of direct physical access to users, there's not so much to worry about. If it does then you should just check if the softwares in question really require root access or not. You can always create less privileged users to run them on your behalf, if they are not really made considering all security implications.
The Raspbery Pi Debian comes with root + a pi user "pre-installed", who has sudo rights. Modern Unix systems does not enable "native root login", so extra user is a need.
If your device is somehow connected to internet, I mean, there is a chance to reach it from internet or a wider LAN, you should follow some security guide lines (e.g. no root login). But if not, say, your device has no LAN access at all, don't worry such things.

How can I check the history of my centos VPS? Linux [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm about to hand out my root server password to a company for them to fix an issue that I have with mydns.
I'm sure they are all above board (and I will change the root password after they have finished) but I just want to be sure.
I know (well I think) I can login after them and execute history to see what they did, but I know if they are dishonest, they can just clear the history. I'm worried in case a rogue employee does something malicious or installs keylogging software (which has happened when my mate let another company manage his VPS).
So is there anything I can do? Does the history command backup somewhere? Can I install a keylogger to verify the commands they execute are not malicious?
Any ideas welcome. Ideally I appreciate I shouldn't give out my root password if I don't trust them. But I am in a very difficult situation and have no choice.
Since you are giving them root access, there is nothing you can do from within the machine that they could not subvert with a rootkit.
Your only way to be sure would be to mount the filesystem in another machine and compare the changes made to the files by comparing with a previously made snapshot/backup.

Granting Access Permission to a file to a specific user [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
In linux, how can I give access permissions to a file/folder to a specific person. In other words suppose I want to allow only and only user fred to be able to read a file, then how do I do that?
Note that I know about chmod and all, but Linux doesn't seem to provide a fine tuned access permission control where you can specify the access control of one specific user.
Thanks,
Alison
Unix uses discretionary access control (DAC) for permissions and access control. For better security SELinux provide mandatory access control (MAC). This is consider difficult for administrators to set up and maintain.
Use commands:
chown user_name file
chown user_name folder
chown -R user_name folder #recursive

Resources