]> arthur.barton.de Git - ConfigScripts.git/blobdiff - install.sh
Detect root user correctly, even when using NIS.
[ConfigScripts.git] / install.sh
index 4645cbd19f022fdfcecbb79955b264c507b15537..ddf2a3da5f9fca638d6dd26729f499006fe1deec 100755 (executable)
@@ -82,7 +82,7 @@ Config_User() {
 
 Config_RootUser() {
        if [ "$UID" = "0" ]; then
-               user=`grep "^.*:.*:0:" /etc/passwd | cut -d':' -f1`
+               user=`grep "^.*:.*:0:" /etc/passwd | head -n 1 | cut -d':' -f1`
                home=`grep "^.*:.*:0:" /etc/passwd | cut -d':' -f6`
                Config_User "$user" "$home"
        else