geekvenue.net

Welcome to Chucktips Hardware HELP WITH DEAD OS Installing FreeBSD Miscellaneous
 faq
 search
 add article
 cool-stuff
 how-to
 main
 tips


HOWTO: Give users root access with su
Users and Groups Posted by Jason on Saturday June 09, @11:26PM
from the god-mode-is-good dept.
If you have ever wanted to know how to give a standard user root privileges then this post is for you. Like so many things in FreeBSD it's simple, you just have to know how to do it.

By default the root account in FreeBSD is only allowed to login from the console. The reason I give my user account root access is that I sometimes like to login to my unix box remotely to perform administrative tasks. I login remotely as my regular user account then change to root with the su (substitute user) command.

All you need to do is add your regular user account to the wheel group.

Login as root and change to the /etc directory. Using your favorite editor, such as vi or ee edit the group file.

Login: root
Password: *******

# cd /etc
# ee group

  Change this:
   wheel:*:0:root
  To this:
   wheel:*:0:root,someuser

Save the file and exit.

Okay. Now that you have completed that task, you can now login as your regular user account and change to root with the su command. There are two ways to do this, one will give you root access but will not execute root's .profile (dot profile). The other will give root access and execute the .profile. I use the later so that I will have all the file paths setup for the root account. This is done with the hyphen (-)switch.

Login as your regualar user and issue the su command:

$ su -
Password: *******     <--(enter the root password)
#     <--(you now have root privileges)

To learn more about the substitute user command su, check the man pages.

  man su

<  |  >

 

Related Links
  • Articles on Users and Groups
  • Also by Jason
  • Contact author

    Lilliput Mini USB Computer Monitor

    If you have ever wanted to learn about Cisco Routers, check out my new book "Cisco Routers for the Small Business" - it's Cisco CLI for the Regular Guy!

  • Sponsors

    The Fine Print: The following comments are owned by whoever posted them.
    ( Add a Reply )

    Re: HOWTO: Give users root access with su
    by susana on Monday February 27, @07:59AM
    hey do you happen to know how it is possisble to get through a firewall they set up at work. It initially didn't let us do anything until we found we could go to browse at work and get past. but now they blocked that as well im awfully bored with out internet you think you can help me? :)
    [ Add a Reply to this ]
    • Re: HOWTO: Give users root access with su
      by trollboy on Thursday August 17, @02:34PM
      Look into tunneling a proxy over ssh ;-)
      [ Reply to this ]

     
    The Fine Print: The following comments are owned by whoever posted them.
    ( Article Reply )

    "You never know how many friends you have until you own a Condo on the beach." -- Jason's Postulate

    Powered by Zope  Powered by Apache  Squishdot Powered
    All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest ©2001 Jason Neumann.
    [ main | post article | search ]