• Home
  • Posts RSS
  • Comments RSS
Blue Orange Green Pink Purple

featured-content

Use Virtual Windows XP in Linux

So you want to use legacy windows-only applications and have no other options and instead of keeping separate machine or installing Complete OS on another partition just for such moments is waste of resources. Then you can use VMWARE products to do this, the preferred application is VMware Workstation, but I have seen you can install it via freeware VMware server too.

Read More

sudo + wheel = user can be root

SITUATION:-
-----------------------------------------------------------------------
[anshu@Fedora7 ~]$ sudo ls /root/
anshu is not in the sudoers file. This incident will be reported.
[anshu@Fedora7 ~]$
-----------------------------------------------------------------------


So you see, running some commands which need root access CANNOT be run by normal user.
And you have option to go as su (super user. ie- root) to do all steps as root. but what about JUST single line commands. for that your username can have special access. This post will show how and what it is.


------------------------------------------------------------------------------
[root@Fedora7 ~]# whatis sudo
sudo (8) - execute a command as another user
sudo (rpm) - Allows restricted root access for specified users
sudo [sudoedit] (8) - execute a command as another user
------------------------------------------------------------------------------


I will show how to make your normal user turn into (sudo)root for single line commands .

Steps:-

1* su --login -c 'visudo' // - Press enter and give root's password.

2* add your username under root line.
-------------------------------------------------------------
root ALL=(ALL) ALL
anshu ALL=(ALL) ALL
-------------------------------------------------------------

HINT* press 'I' key to Insert and 'DEL' key to delete words.

3* uncomment ONE option from line 83 OR 86.
------------------------------------------------------------
82 ## Allows people in group wheel to run all commands
83 # %wheel ALL=(ALL) ALL
84
85 ## Same thing without a password
86 # %wheel ALL=(ALL) NOPASSWD: ALL
------------------------------------------------------------

4* :wq to SAVE and EXIT

5* RECOMMENDED , MODIFY following line in bash_profile to run all files in SuperBIN folder (i.e /sbin or /usr/sbin ):-
-----------------------------------------------------------
PATH=$PATH:/usr/sbin:/sbin:$HOME/bin
-----------------------------------------------------------

6* add user to WHEEL group by GUI or Command:-

------------------------------------------------------------------------------
su -c 'gpasswd -a anshu wheel' // << replace anshu with yourusername ( Duh! )
------------------------------------------------------------------------------

Try running commands like "ls /root/" and click some ads on this site as Thank You :).


Update:- Check this guide in video.

Read More 0 comments | Posted by anshuman |

0 comments



Post a Comment
Newer Post Older Post Home

Linux-Truthiness

  • About
      I am system-administrator / php developer for past 5+ years working with various companies. If you like my blog and have some more suggestions,comments,tips or need any other info, feel free to contact me at linuxtruthiness [at] gmail [dot] com.
  • Search






    • Home
    • Posts RSS
    • Comments RSS
    • Edit

    © Copyright Insiders guide for usability in linux. All rights reserved.
    Designed by FTL Wordpress Themes | Bloggerized by FalconHive.com
    brought to you by Smashing Magazine

    Back to Top