25 January 2026

sles yast sudo linux sysadmin

Allow a Regular User to Launch GUI YaST Without a Password

Quick one-liner: Let a regular user run graphical YaST with sudo — no password required. Quick setup with a sudoers.d drop-in file.


🤔 Why This Matters

YaST is SUSE's all-in-one system administration tool. Running it requires root privileges, which means typing sudo yast2 and entering your password every time.

If you're the sole admin of a lab machine or a development system, this gets tedious fast. You can configure sudo to let a specific user launch YaST without a password prompt.

Security note: This removes the password barrier for YaST — which is a powerful system administration tool. Only do this on machines where the security trade-off is acceptable.


🔧 Step 1: Create a sudoers Drop-in File

Create a file in /etc/sudoers.d/:

sudo visudo -f /etc/sudoers.d/yast2

Add these lines:

Defaults env_keep += "DISPLAY XAUTHORITY"
tux ALL = NOPASSWD: /sbin/yast2

Replace tux with your actual username.

Line What It Does
env_keep += "DISPLAY XAUTHORITY" Preserves X11 environment variables so the GUI can display on your screen
tux ALL = NOPASSWD: /sbin/yast2 Allows user tux to run /sbin/yast2 as root without a password

🔧 Step 2: Test It

Open a terminal and run:

sudo yast2

YaST should launch immediately — no password prompt.


🖥️ Step 3: Create a Desktop Shortcut (Optional)

Create a desktop entry so you can launch YaST from your application menu:

cat > ~/.local/share/applications/yast2.desktop << 'EOF'
[Desktop Entry]
Type=Application
Name=YaST2 (No Password)
Comment=SUSE System Configuration
Exec=sudo yast2
Icon=yast
Terminal=false
Categories=System;Settings;
EOF

Now you'll find "YaST2 (No Password)" in your application launcher.


🔒 Security Considerations

If you're security-conscious, skip this and just use sudo yast2 with the password prompt.