|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
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. |
|
#2
|
||||
|
||||
|
# 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. |
|
#3
|
||||
|
||||
|
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 /).
__________________
FreeBSD Admin Tips Tricks and Scripts |
|
#4
|
|||||
|
|||||
|
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 Quote:
Quote:
Quote:
this should be what I need, correct? |
|
#5
|
|||
|
|||
|
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.
|
![]() |
| Viewing: Dev Shed Forums > Operating Systems > BSD Help > Logging in |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|