Thread: Logging in

    #1
  1. No Profile Picture
    Sencha Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2001
    Location
    STL
    Posts
    547
    Rep Power
    0

    Logging in


    When I start my FreeBSD 4.4, sometimes I get asked to log in and sometimes I get asked to enter the path to shell.

    When I have to enter the shell, I get the command prompt with # but when I log in, I get $.

    Is the # prompt for the superuser? How do I switch between the superuser and a user I made? I tried logout and login and it just says they can not be found.
    -Mitchell Simoens
  2. #2
  3. Mobbing Gangster
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Sep 2001
    Location
    "Best City" 2002 and 2003- Melbourne, Australia
    Posts
    4,912
    Rep Power
    33
    # is for chs and $ is for sh, and yes afaik csh is by default for root.
    To switch between users use 'su username', if you're logged in as root then you wont neet to enter the password. Of course, you could always 'logout' or 'exit' and log in again, or switch ttys - which is probably the best way to be logged in as two users at the same time.
    And you know I mean that.
  4. #3
  5. funky munky
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jul 2001
    Location
    UK
    Posts
    1,446
    Rep Power
    16
    You typically get asked to enter the path to a shell at boot-time if there is a configuration problem that freebsd detects and it determines from this it is best to drop you into single user mode so you can make the required modifications to the system configuration. Single user mode is analogous to windows 'safe mode', loading the system minimally so as to allow you to make the changes needed to get the system up.

    For example the last time this happened to me was yesterday after I had edited the /etc/rc.conf file. I had mistakenly missed a closing " in one of my /etc/rc.conf entries and so freebsd, unable to parse the file correctly, dropped me into single user mode so I could make the changes to the file.

    This required specifying the full path to the vi editor/file:
    Code:
    /usr/bin/vi /etc/rc.conf
    from where I could make the necessary changes to the rc.conf file to allow me to reboot into multi-user mode.

    READ THE ERROR BEFORE THE LINES ASKING YOU FOR THE PATH TO YOUR SHELL - you should get some indication of what went wrong and what you should do to fix it.

    Note also that you may need to mount one or more of your drive devices first to fix the problem. Also you may need to remount the partition in rw mode (since freebsd mounts some partitions read only to avoid corruption).

    To check what is currently mounted and in what mode, simply type: /sbin/mount at the command prompt (again using the full path to the mount executable because your path may not be setup in single user mode). If the partition on which the files you need to fix reside is not mounted (or mounted in read only mode), you will need to mount the partition using: /sbin/mount -t ufs <mount-point>, where <mount-point> is a valid entry in your fstab file (ie mount -t ufs /).
  6. #4
  7. No Profile Picture
    Sencha Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2001
    Location
    STL
    Posts
    547
    Rep Power
    0
    I tried to use the full path to vi editor (/usr/bin/vi) but that was not found. I tried to use the man command but that isn't even working....

    FreeBSD said that my hostname in rc.conf should look like this
    And your hostname must be set to a FQDN in this form: xxx.yyy.zzz where xxx is your hostname -s and yyy.zzz is your fake domain.
    Linux or BSDs no difference.
    In /etc/rc.conf, you need to set hostname="xxx.yyy.zzz"
    ipconfig_ep0="inet 192.168.0.3 netmask 255.255.255.250"
    >> inet 192.168.0.3 netmask 0xffffff00 broadcast 192.168.0.255

    Just set all boxes to use 255.255.255.0 (0xffffff00).
    this should be what I need, correct?
    -Mitchell Simoens
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2001
    Posts
    4
    Rep Power
    0
    I already told you if you wanted to learn FreeBSD, do a fresh install on a dedicated box. Running it on Virtual PC (emulator) or whatever makes your life tougher because it's non-standard. When it's non-standard, you can't expect your FreeBSD is fully compatible with Virtual PC. When weird things happen, you need to ask the people who run Virtual PC, but I doubt if they can help you at all.

IMN logo majestic logo threadwatch logo seochat tools logo