Jump to content
GSForum - Segélyvonal

Leállítás sima user-ként


Recommended Posts

Posted

Sziasztok!

Azt szeretném kérdezni, hogy hogyan lehet beállítani egy Slackware-t úgy, hogy sima user-ként is ki lehessen kapcsolni. :hááát:

Posted

KDM/GDM/XDM-en keresztül ki tudod kapcsolni grafikus felületen userként.

Ha parancssorból kell akkor sudoval próbálkozz. Van elegánsabb módszer is, de most nem tudom fejből.

 

 

Szerk.: tele van elegáns megoldásokkal. Például hozzaadhatod a felhasználót a shutdown csoporthozm, vagy pedig az /etc/sudoers fájlban ott a kész sor a shutdown használatához sudoval.

Posted

A sudoers szerkesztésével próbálkoztam (és újra akartam indítani), de ez lett az eredménye:

thomas@darkstar:~$ sudo init 6
Password:
sudo: init: command not found
thomas@darkstar:~$

a sudoers fájlom pedig így néz ki:

# 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
Host_Alias LOCAL = localhost,darkstar

# User alias specification
User_Alias SUUSR = thomas

# Cmnd alias specification
Cmnd_Alias HALT=/sbin/init "",/sbin/init

# Defaults specification

# Runas alias specification

# User privilege specification
root    ALL=(ALL) ALL
SUUSR   LOCAL=(root) NOPASSWD: HALT

# 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/shutdown -h now

Mi lehet a hiba? És azt sem értem, hogy elvileg nem szabadott volna jelszót kérnie :pislog: (shutdown csoportom pedig nincsen, de ez a sudoers-es megoldás kéne inkább)

Posted

Sudoers fájl legutolsó sor:

# %users localhost=/sbin/shutdown -h now

Ez elõl vedd ki a kommentet.

Utána:

sudo shutdown -h now-val simán leállíthatod.

Jelszót kér a sudo, de a user jelszavát kell megadnod, nem a rootét.

man sudo

man sudoers

Posted

Kipróbáltam, az eredmény:

bash-3.00$ sudo shutdown -h now
sudo: shutdown: command not found
bash-3.00$

:?::?::?:

Posted

Hm. sudo lehet a sima felhasználó PATH-át használja.

Így: sudo /sbin/shutdown -h now ?

Posted

Ez az, nagyon köszönöm!!!!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...