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.
===============================
[joe@localhost joe]$ su -
Password:
[root@localhost root]# mkdir /mnt/windows
[root@localhost root]# kwrite /etc/fstab
[root@localhost root]# mount /dev/hdb2
[mntent]: warning: no final newline at the end of /etc/fstab
mount: wrong fs type, bad option, bad superblock on /dev/hdb2,
or too many mounted file systems
(aren't you trying to mount an extended partition,
instead of some logical partition inside?)
[root@localhost root]# mount /dev/hdb1
[mntent]: warning: no final newline at the end of /etc/fstab
mount: /dev/hdb1 already mounted or /mnt/c busy
mount: according to mtab, /dev/hdb1 is already mounted on /mnt/c
[root@localhost root]# kwrite /etc/fstab
============================
heres my fstab
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda3 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/cdrom1 /mnt/cdrom1 udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
/dev/hdb1 /mnt/c ntfs auto,owner,ro, 0 0
/dev/hdb2 /mnt/windows ntfs auto,owner,ro, 0 0
============================
anything wrong? i tried to mount c on hdb1 but it didnt work..
i have 3 partitions on it for music and movies.. so i tried hdb2
and it still didnt work...
i just tried to access it in konqueror and it said only root can access /windows...
WTF i typed su - in the window a million times.. how do i get root all the time?
i press ctr alt f2 and type su - then p/w and it says incorrect login.. BAH
===========================
[joe@localhost boot]$ su -
Password:
[root@localhost root]# mount /dev/hdb1
mount: /dev/hdb1 already mounted or /mnt/c busy
mount: according to mtab, /dev/hdb1 is already mounted on /mnt/c
[root@localhost root]# mount /dev/hdb2
mount: wrong fs type, bad option, bad superblock on /dev/hdb2,
or too many mounted file systems
(aren't you trying to mount an extended partition,
instead of some logical partition inside?)
[root@localhost root]# mount /dev/hd3
mount: can't find /dev/hd3 in /etc/fstab or /etc/mtab
[root@localhost root]#
To see how the drive is partitioned log in as root
fdisk -l /dev/hdb
An extended partiton is a container for logical drives and can not be mounted. The reason for extended partition / logical drives was to break the 4 parimary partition limit from the original Hard disk drive design. Logical partitions start at 5.
>>question 2a. warning: no final newline at the end of /etc/fstab
You need to insert an EOL character by moving the cursor to the end of the last line of the fstab file and press the enter key.
and about the root thing... is there diff ways to do it? i go to terminal and type su - then p/w and it gives me temp root access... i want a perm access if possible
There are several reasons not to log in as root on a perm basis. linux commands can be cryptic at times. If you make a mistake and wipe out something major your SOL because undeleting can be very difficult to impossible depending on the filesystem. The second important reson not to be root is if your connected to the internet you could be allowing root access to anyone if your system has any security vuneralbilities.
I don't run Redhat so I am unaware how to renable the root login. Have you looked at the documentation at Redhat's website?
Your old line has a trailing comma, that is what's causing the errors you mentioned earlier. I'd recommend using the users setting instead of owner so that non-root users can view the partition, this is based on assumption that this machine is only used by you and/or trusted people only.
I don't recommend automounting the NTFS partition... you'll have problems mounting it as non-root.
On your Konsole, you're logged in as root... if you've mounted the partition as root, only root can view it. Unmount it first... then mount as a normal user, you should be able to access the partition then.
Your second screenshot shows the user flag... which is wrong... listen to good advice... use users instead.
Since it appears that you haven't read any of my other links or appeared to search for the answer yourself:
Change your /etc/fstab file
/dev/hdb1 /mnt/windows ntfs ro,umask=0222 0 0
If you read the man pages for mount on user,users options. With user can mount but the only the user that mounted can unmount. Users allows any user to unmount regardless of who mounted it.
Make sure that the permissions of the directory you want to mount the NTFS partition is set for read / write with hdb1 unmounted.
BTW if you haven't figured it out your other drives are hdb5 and hdb6.
ok so i change that last line to
/dev/hdb1 /mnt/windows ntfs ro,umask=0222 0 0
how do i unmount a drive?
i tried to unmount the /c by right clicking icon but it said its not in fstab so what do i put in there to unmount it?
Where do you have the NTFS drive mounted? /mnt/windows or /mnt/c?
Log in as root:
In a console window.
umount /mnt/c
The only way a regular user can mount / unmount a filesystem is if there is an entry in the /etc/fstab file and it has either the user or users option.
Quote:
how do i set the permissions to a file or folder? ls -l something?
can i set every file read write access?
Did you every read the URL I posted on file permisions from your
1st question? You need to use the chmod command. Setting everyfile to read / write is almost as bad as being logged in as root all of the time.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.