csutomi Posted October 5, 2006 Posted October 5, 2006 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.
aty Posted October 6, 2006 Posted October 6, 2006 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.
csutomi Posted October 7, 2006 Author Posted October 7, 2006 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 (shutdown csoportom pedig nincsen, de ez a sudoers-es megoldás kéne inkább)
aty Posted October 7, 2006 Posted October 7, 2006 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
csutomi Posted October 7, 2006 Author Posted October 7, 2006 Kipróbáltam, az eredmény: bash-3.00$ sudo shutdown -h now sudo: shutdown: command not found bash-3.00$
aty Posted October 7, 2006 Posted October 7, 2006 Hm. sudo lehet a sima felhasználó PATH-át használja. Így: sudo /sbin/shutdown -h now ?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now