What drive am I on?
Hullo penguins,
Its been a few years since I touched linux, now I'm back on it with RHEL 4. I have two questions if you please! 1) I am logged in as root. I have four hard drives. But how do I determine which drive all the main files are on? Code:
root@host [/home]# cd / And secondly. I have created a user. And this user has absolutely no permission to do anything. Now I think this may have something to do with assigning the user to a group that has +x permission on each service I am trying to run? I mean for example, even SU does not work. Code:
vsftpd@host [/]# su root |
hi,
put the following command df -h it will show u which partition is on which hdd if it is /dev/hda then its primary master and likewise about adding a user check the user entry in /etc/passwd file what is uid and gid for time being to make it root user u can change uid of user to 0 so it will have all access . to add in roots group use adduser -g username group thanks |
Look at your /etc/fstab file to see the drive and partition location of the ones linux is using.
Also just do ' su ' or ' su - '. su is root with the previous users enviroment variables. su - is root using root's enviroment variables. Brian1 |
Quote:
However, there is a potential that one of those is symlinked to /disk1, /hdd2 or /hdd3, but I would imagine that many apps would not play ball with a symbolic linked /usr or /etc so it is probably a very safe bet that they are on /dev/sda1. This could be quickly asserted with an "ls -l". You do know you can use "df -h" to get a human friendly version in 2Dp units like Kb, Mb and Gb. Quote:
What groups are the user in? How did you create the user? Danny |
Thank you for all your replies!
Brian the contents of /etc/fstab reads: Code:
# This file is edited by fstab-sync - see 'man fstab-sync' for details Code:
root@host [/]# df -h Q1) What is the 'none' drive? Is this normal? As suggested I also look in to /etc/passwd and this is what it says for VSFTPD: Code:
vsftpd:x:32003:32003::/home/vsftpd:/bin/bash Thanks to all who took the time to reply, I appreciate it. |
Forgot the redhat scheme of /etc/fstab. You need to look at /etc/mtab to see what /dev the LABEL equeals to in /etc/fstab.
Misread the section on su in post. If you wish to allow a user a few root commands then you can either setup /etc/sudoers file using the visudo tool to edit. Brian1 |
The vfstpd user is a system user and not a regular user. Create a real regular user account to use.
The "none" in /etc/fstab is normal for "shm" and "proc" and other pseudo filesystems. |
Quote:
Code:
adduser fsftpd |
System users don't have home directories like regular users, and they have awkward names.
You should make sure even the system users are placed in the group of regular users so, so the system users can use commands such as su. |
Quote:
This work swell if you have a whole bunch of commands you only want some users, but not all to run. First, group up the commands by who needs to use them, for example if commands a,b and c should be usable by some users, and commands d, e and f by some others, you have two groups there. Then create groups for these on your system (with a suitable name like "accessabc"). You then change the group ownership of the commands in question (you can find their actual dir location with "which" followed by the command name) to the new group, and unset the everybody execute flag: (Example for the command su) Code:
$ which su Code:
$ chmod g+x /usr/bin/su Users not in that group will then not be able to execute the command. However, if the command is a perl, or shell script, they may be able to circumvent the execute protection by running it from the interpreter. A way to prevent that is to unset the global read flag (o-r), and ensure that the group read flag is set (g+r) so that only users in the group can even read the file the command is stored in. Danny |
All times are GMT -5. The time now is 03:33 PM. |