A few newbie questions... - BSD

This is a discussion on A few newbie questions... - BSD ; I've been playing with Linux since the days before KDE and Gnome, but I'm quite new to FreeBSD. I recently installed v6.1. Before setting up kdm I forgot to set a root password at the console. Now that KDE's starting ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: A few newbie questions...

  1. A few newbie questions...

    I've been playing with Linux since the days before KDE and Gnome,
    but I'm quite new to FreeBSD.
    I recently installed v6.1. Before setting up kdm I forgot to set
    a root password at the console. Now that KDE's starting I can't gain
    root access. Typing 'su root' in a konsole window just gets me
    'Sorry.'(!)
    Mainly, I need to edit my fstab to add a second HDD (D: drive
    under XP) to copy over my files. So...
    How do I gain access as root, and what is the correct syntax for
    that second drive? What would the mount point be? I assume just
    having 'auto' will mount it at boot?
    Thanks!

  2. Re: A few newbie questions...

    On Mon, 11 Dec 2006 19:32:19 +1100
    Guy Parry wrote:

    > I've been playing with Linux since the days before KDE and Gnome,
    > but I'm quite new to FreeBSD.
    > I recently installed v6.1. Before setting up kdm I forgot to set
    > a root password at the console. Now that KDE's starting I can't gain
    > root access. Typing 'su root' in a konsole window just gets me
    > 'Sorry.'(!)


    This is okay :-)

    > Mainly, I need to edit my fstab to add a second HDD (D: drive
    > under XP) to copy over my files. So...


    For this task you wont need to edit fstab. Just mount the disk.

    > How do I gain access as root, and what is the correct syntax for
    > that second drive? What would the mount point be? I assume just
    > having 'auto' will mount it at boot?


    Boot into single user mode. Remount / read+write and set the password.

    > Thanks!



    Best regards,

    Stefan

  3. Re: A few newbie questions...

    Guy Parry wrote:

    > I've been playing with Linux since the days before KDE and Gnome,
    > but I'm quite new to FreeBSD.
    > I recently installed v6.1. Before setting up kdm I forgot to set
    > a root password at the console. Now that KDE's starting I can't gain
    > root access. Typing 'su root' in a konsole window just gets me
    > 'Sorry.'(!)
    > Mainly, I need to edit my fstab to add a second HDD (D: drive
    > under XP) to copy over my files. So...
    > How do I gain access as root, and what is the correct syntax for
    > that second drive? What would the mount point be? I assume just
    > having 'auto' will mount it at boot?
    > Thanks!


    Try switching virtual consoles?

    CTRL+ALT+F1 through to CTRL+ALT+F8 for text-based virtual consoles.
    CTRL+ALT+F9 for graphical X server.

    If the you're currently on a text-based virtual console, you can omit
    pressing CTRL.

    CTRL+ALT+F1 or CTRL+ALT+F2 should get you a login prompt.


    For the second HDD, create a mount point:
    # mkdir /hdd
    # chown user hdd
    # chgrp group hdd
    where user and group are the username and group name of the user that will
    have full control over the mount (for non-root users, the user and group
    are generally the same).


    Next, you need to determine the device name of second HDD.
    Generally, the hard drives are devices starting with ad.
    ls /dev/ad*

    For each device listed, display partition information for the disk:
    fdisk /dev/ad1
    fdisk /dev/ad2
    etc.

    It will displays the partitions and their types for the disks.
    You should be able to determine which of these devices is the second HDD
    (normally its ad2 but sometimes it's not depending on the configuration of
    your hard drive controllers) and what partition you want to mount.

    Windows XP will have an NTFS or FAT type partition (generally NTFS).

    Once you've determined which device your second hard drive is, test it.
    Say you want to mount partition 2 on ad2 (/dev/ad2s2).
    For NTFS: mount_ntfs /dev/ad2s2 /hdd
    For FAT: mount_msdosfs /dev/ad2s2 /hdd

    Check whether you've got the right drive and you're seeing the files on the
    drive: ls -l /hdd. When you're done, unmount it: umount /hdd.

    Now you can create an fstab entry for the drive in /etc/fstab.
    For NTFS: /dev/ad2s2 /hdd ntfs rw 0 0
    For FAT: /dev/ad2s2 /hdd msdosfs rw 0 0

    auto is generally enabled by default so you don't have to put it in.

    Then it should be done.
    Restart or do 'mount /hdd' as root to test.


  4. Re: A few newbie questions...

    On Mon, 11 Dec 2006 19:32:19 +1100, Guy Parry wrote:
    > I've been playing with Linux since the days before KDE and Gnome, but
    > I'm quite new to FreeBSD.


    Welcome to FreeBSD too, then

    > I recently installed v6.1. Before setting up kdm I forgot to set a
    > root password at the console. Now that KDE's starting I can't gain
    > root access. Typing 'su root' in a konsole window just gets me
    > 'Sorry.'(!)


    You are not in the 'wheel' group. To be able to use 'su' to become
    root, your username should be a member of the 'wheel' group.

    > Mainly, I need to edit my fstab to add a second HDD (D: drive under
    > XP) to copy over my files. So...


    > How do I gain access as root, and what is the correct syntax for that
    > second drive? What would the mount point be? I assume just having
    > 'auto' will mount it at boot?


    When installing FreeBSD, you were prompted for a root password. Use
    that password to log into the system as 'root', and then add your user
    to the wheel group with:

    # pw groupmod wheel -m USERNAME

    where 'USERNAME' is your plain, non-superuser account name.

    After you log out of your existing 'USERNAME' sessions and log into the
    system again, your group list should include wheel too, i.e.:

    $ groups
    users wheel
    $

    Now, you can use 'su' to become root.

    The syntax for drive names is described in the Handbook. Please have a
    look at the Handbook section called `Installing FreeBSD', at:
    http://www.freebsd.org/doc/en_US.ISO...k/install.html

    Pay special attention to the `Allocating Disk Space' section, at:
    http://www.freebsd.org/doc/en_US.ISO...all-steps.html


+ Reply to Thread