LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-05-2012, 11:06 AM   #1
lkraemer
Member
 
Registered: Aug 2008
Posts: 113

Rep: Reputation: 10
How to add a functional sudo group?


I'm running Slackware 14, and I'd like to be able to use the sudo command,
versus changing to root all the time.

I've created a system group (999) named sudo. I've tried to use usermod
to add myself to group sudo while I'm root. But, it doesn't appear to work
since my groups do not change.

What do I need to do to get my userid added to the sudo group, or another
system group so the sudo command works?

I've referenced the man pages for useradd, usermod, groupadd.

Thanks.

Larry
 
Old 10-05-2012, 11:19 AM   #2
13_
LQ Newbie
 
Registered: Oct 2012
Posts: 13

Rep: Reputation: Disabled
You need to log out and log back in for it to take effect.

I use gpasswd.

gpasswd -a <username> <group>

Last edited by 13_; 10-05-2012 at 11:27 AM.
 
Old 10-05-2012, 01:49 PM   #3
lkraemer
Member
 
Registered: Aug 2008
Posts: 113

Original Poster
Rep: Reputation: 10
13,
Thanks, that was the first part of the problem.

The second was that gparted was at /usr/sbin/gparted, and that wasn't in my path.


I needed to find the "SHELL" and "env" I was using.

1. env -- Display the current environment, find what Shell is being used with the following command.....
Code:
    env | grep SHELL=
You can also type:
Code:
    env > envorig.txt
to create a file of the results. Later you can do a comparison for future reference.

2. locate .*rc -- Find the current logged in user's home shell Configuration file (*rc)... use:
Code:
locate .*rc
REF:
http://en.wikipedia.org/wiki/Unix_shell
Bourne shell (sh)
Almquist shell (ash)
Bourne-Again shell (bash)
Debian Almquist shell (dash)
Korn shell (ksh)
Z shell (zsh)
C shell (csh)
TENEX C shell (tcsh)
other shells..............

There may be a .bash_profile file in /home/loginuser along with .bashrc. You can put configurations in either file,
and you can create either if it doesn’t exist. But, why two different files? What is the difference?

According to the bash man page, .bash_profile is executed for login
shells, while .bashrc is executed for interactive non-login shells.

If .bash_profile exists in /home/user with the following information already inserted:
Code:
	PATH=$PATH:$HOME/bin
	export PATH
Just append your path modifications here instead of the .bashrc file.

You need to list the *rc file to verify the contents and set the PATHS. I'm ASSUMING a Bash shell......

3. cat .bashrc -- List the configuration file, then append the proper search paths for the users shell with edit.
(This did not not exist in Slackware 14)
Quote:
export LD_LIBRARY_PATH=????????????????????????????????
export LIBRARY_PATH=???????????????????????????????????
export C_INCLUDE_PATH=?????????????????????????????????
export CPATH=??????????????????????????????????????????
Mine in Debian 6.0 happens to be:
Quote:
export LD_LIBRARY_PATH=/usr/lib:/usr/local/lib
export LIBRARY_PATH=/usr/lib:/usr/local/lib
export C_INCLUDE_PATH=.:/usr/include:/usr/local/include
export CPATH=.:/usr/include:/usr/local/include
But your may vary accordingly. You won't be able to cut & paste mine,
unless your system is built exactly like mine. It's up to you to locate
exactly where all the libs and includes are located. That is what all the
previous commands should have helped you do. Just because you have
/usr/lib & /usr/local/lib included....doesn't mean your needed lib is in that path.

That is where your detective work comes to play. SEARCH and use grep to locate the libs.

Once you have the env set either reboot or reset the env. Once again, your system command for this can/may be different.

4. source .bashrc -- Reset the environment to what we need for Compiles, assuming the SHELL is bash. This may not be
available on your system.....


Larry
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I add a group of users to the wheel group? Teleute Linux - Security 7 05-21-2010 09:55 PM
group: add complete group into other group max_mad SUSE / openSUSE 1 04-12-2006 01:43 AM
Sudo Group CrimsonSparc Linux - Newbie 17 06-14-2005 02:54 AM
sudo changes the owner and the group of some my files and now I can't enter in X Ali79 Linux - Software 5 12-10-2004 01:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration