I just recently installed FreeBSD and my system has basically nothing. I add one user which is myself. However I can't do anything with that account since i haven't set permission. My friend told me I need to use sudo command, but which is not available in my machine yet... i don't have lynx and gweb .... can anyone tell me how I obtain sudo , lynx gweb to my system? and of course, how do i set user permission ? Thanks very much

The reason you can't do administrative tasks with a regular user is because it's more secure that way. It's designed so that normal users will have to authenticate themselves if they want to add or remove software from a system, change systemwide settings, etc.

You don't need sudo to authenticate. At the prompt, enter the following:

$ su

Now enter the root password. You'll be presented with another prompt, which usually ends in '#'. You can now enter all your admin commands here. When you're done, type 'exit' and hit return, and you'll be returned back to your own user's shell.

sudo is a little bit different... after you've configured it properly, you prefix any command that you need administrative rights for, it prompts you for YOUR password (not the root password), then executes only that command. It's simply another way of authenticating, but seeing that it's not the default mode of authentication on FreeBSD, I'd recommend getting used to using 'su' first.

Finally... installing software on FreeBSD is fairly easy. At the moment, I don't have the energy to regurgitate any more information that's already freely available on the web, so here's a link to the official documentation itself:

http://www.freebsd.org/doc/en/books/handbook/ports.html

first of all, thanks for john's reply...


When I typed " % su " my freeBSD pops "command not found" just as when I type "lynx" for text browser. Can anyone please tell me where those unix command such as "su" or "lynx" come from? Are they the utilities of shells? Or if they are from the package I have to install? If so, what is the package name?

And of course how do i obtain them?

>When I typed " % su " my freeBSD pops "command not found"
No '%' is necessary. Just type in su at the prompt without any kind of prefix, and it should work fine.

Once you're authenticated, follow the link I gave in my previous post for instructions on how to install more software.

>When I typed " % su " my freeBSD pops "command not found"
No '%' is necessary. Just type in su at the prompt without any kind of prefix, and it should work fine.

Once you're authenticated, follow the link I gave in my previous post for instructions on how to install more software.

after i typed "su" it says Apr 19 11:13:35 su: BAD SU henry to root on /dev/ttyv0

what is that mean?

>what is that mean?
It probably means that you're not part of the wheel group (a typical elite administration group on Unix systems). To add yourself to it, you need to log in as root, then run type the following:

pw groupmod wheel -M root,YourUserName

Replace 'YourUserName' with your username. Log out back in as your regular user, and su should work as expected.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.