LinuxQuestions.org
Review your favorite Linux distribution.
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 05-30-2004, 03:08 PM   #31
darthtux
Senior Member
 
Registered: Dec 2001
Location: 35.7480° N, 95.3690° W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070

Rep: Reputation: 47

Again, look at this page
http://www.starnetok.net/~jallen/tutorials/su-sudo.html

The /etc/sudoers file has to be set up correctly.
 
Old 05-30-2004, 03:12 PM   #32
iotc247
Member
 
Registered: Mar 2004
Location: Florida
Distribution: Gentoo
Posts: 248

Original Poster
Rep: Reputation: 30
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#

# Host alias specification

# User alias specification

# Cmnd alias specification

# Defaults specification

# User privilege specification
root ALL=(ALL) ALL
alex ALL=(ALL) ALL
# Uncomment to allow people in group wheel to run all commands
# %wheel ALL=(ALL) ALL

# Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL

# Samples
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
%users localhost=/sbin/reboot,/sbin/poweroff,/sbin/installpkg,/sbin/removepkg
 
Old 05-30-2004, 03:13 PM   #33
iotc247
Member
 
Registered: Mar 2004
Location: Florida
Distribution: Gentoo
Posts: 248

Original Poster
Rep: Reputation: 30
Wait if i have to sudo every 15 minutes is there a cron tab or something i can setup to sudo for the user alex only? if so where would the file be that i need to stick it in and what text would i need to insert.
 
Old 05-30-2004, 03:14 PM   #34
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Well if you realy don't want to type password add
%users localhost=(ALL) ALL NOPASSWD: ALL

[edit]
warning : do not run ssh server

Last edited by keefaz; 05-30-2004 at 03:15 PM.
 
Old 05-30-2004, 03:22 PM   #35
iotc247
Member
 
Registered: Mar 2004
Location: Florida
Distribution: Gentoo
Posts: 248

Original Poster
Rep: Reputation: 30
Im not running it.. Do i have to logout for the thing to take affect is that why it wont work?
 
Old 05-30-2004, 03:26 PM   #36
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
How do you test it ?
 
Old 05-30-2004, 03:33 PM   #37
iotc247
Member
 
Registered: Mar 2004
Location: Florida
Distribution: Gentoo
Posts: 248

Original Poster
Rep: Reputation: 30
What?
 
Old 05-30-2004, 03:35 PM   #38
iotc247
Member
 
Registered: Mar 2004
Location: Florida
Distribution: Gentoo
Posts: 248

Original Poster
Rep: Reputation: 30
nvm unless someone can create a script or something that allows me to reboot shutdown install packages and run swaret without being root and without putting in an extra command... I want to just have it where i just type swaret --upgrade as a regular user but i have a file lets say /etc/perms that controls which users can do what...
 
Old 05-30-2004, 03:36 PM   #39
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
do sudo -l
enter YOUR password not ROOT and see ...
 
Old 05-30-2004, 03:48 PM   #40
iotc247
Member
 
Registered: Mar 2004
Location: Florida
Distribution: Gentoo
Posts: 248

Original Poster
Rep: Reputation: 30
User alex may run the following commands on this host:
(ALL) NOPASSWD: ALL
 
Old 05-30-2004, 03:50 PM   #41
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
and did you try
sudo /usr/sbin/swaret --update
?
 
Old 05-30-2004, 03:53 PM   #42
iotc247
Member
 
Registered: Mar 2004
Location: Florida
Distribution: Gentoo
Posts: 248

Original Poster
Rep: Reputation: 30
swaret 1.6.2-1

You need 'pkgtools' in order to use swaret!
'pkgtools' can be found in the Slackware Packages Directory: slackware/a!
 
Old 05-30-2004, 03:53 PM   #43
iotc247
Member
 
Registered: Mar 2004
Location: Florida
Distribution: Gentoo
Posts: 248

Original Poster
Rep: Reputation: 30
You mean i have to put the directory to it? screw that then ill just use su.. its alot less i just wanted something where i never have to type su or sudo command i just wanted to type command and it worked...
 
Old 05-30-2004, 03:55 PM   #44
BorisMcHack
Member
 
Registered: May 2004
Location: uk
Distribution: debian sarge
Posts: 65

Rep: Reputation: 15
Top Thread
 
Old 05-30-2004, 03:58 PM   #45
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Well in the way you go, you may end with a computer less secure than one running windows 98 lol
If I were you I would remove the %users localhost=(ALL) ALL NOPASSWD: ALL line in /etc/sudoers
 
  


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
file permissions OK, but command permissions? stabu Linux - General 2 10-05-2005 12:00 PM
permission ... permissions .... permissions alaios Linux - General 1 05-31-2005 04:16 AM
Permissions jymmi Linux - Newbie 3 04-14-2005 11:43 PM
Permissions help reddog64 Linux - Newbie 1 04-22-2004 05:23 PM
getting a directory's permissions and creating a new one with the same permissions newbie1000101 Programming 1 04-10-2004 12:52 PM

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

All times are GMT -5. The time now is 06:37 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