Jump to content
Froxlor Forum

roothahn

Members
  • Content Count

    34
  • Joined

  • Last visited

Everything posted by roothahn

  1. Hi guys, I want to modify the user template and add functionalit with php but I am stuck on how to get postet form data. What I want to do: 1- Give customer a form with input - so far I've come 2- get the $_POST[] data and execute php code my question: where do I write my code? (i suppose the template tpl files are not the correct place) and can I just write normal php code? thanks!!
  2. the solution was ridiculous: I found out that nscd isn't actually needed (since the users dont log in) and caused the problems. libnss-mysql is sufficient for getting the usernames.
  3. Hi all, did anyone try using froxlor with CentOS 7? I'm stuck at nscd. Installed the package "nscd" and "libnss-mysql" provided by CentOS and took the debian-wheezy example (in /usr/share/docs/libnss/examples are bg-types of queries). After "service nscd restart" (I rebooted too), the system still doesn't know the user (which is definitely in the ftp_users table): # ls -al /home/webs/silvio rwxr-xr-x. 3 root root 4096 27. Aug 21:21 . drwxr-xr-x. 5 root root 4096 27. Aug 20:47 .. drwxr-xr-x. 2 10000 10000 4096 27. Aug 20:47 silvio [root@web webs]# chown -R silvio silvio chown: ung?ltiger Benutzer: ?silvio? # translation: "unknown user" After setting the logging in "/etc/nscd.conf" to "debug-level 9" that's what the log tells me when I ?chown?: Do 28 Aug 2014 09:51:36 CEST - 29868: handle_request: Anforderung empfangen (Version = 2) vom Prozess 30018 Do 28 Aug 2014 09:51:36 CEST - 29868: GETFDPW Do 28 Aug 2014 09:51:36 CEST - 29868: Erm?gliche Zugriff auf Datei-Deskriptor ?8?, f?r passwd Do 28 Aug 2014 09:51:36 CEST - 29868: handle_request: Anforderung empfangen (Version = 2) vom Prozess 30018 Do 28 Aug 2014 09:51:36 CEST - 29868: GETPWBYNAME (silvio) Do 28 Aug 2014 09:51:36 CEST - 29868: Habe ?silvio? nicht im Password-Cache gefunden! Do 28 Aug 2014 09:51:36 CEST - 29868: F?ge neuen Eintrag ?silvio? vom Typ GETPWBYNAME f?r passwd zu cache (erster) hinzu It just said that the user is not found in cache and adds a new entry, but it seems to me that it just looks in the "files" switch, it seems he tries not even to use the "mysql" switch. Here are my configs: /etc/libnss-mysql.cfg getpwnam SELECT username,'x',uid,gid,'MySQL User',homedir,shell \ FROM ftp_users \ WHERE username='%1$s' \ AND login_enabled = 'Y' \ LIMIT 1 getpwuid SELECT username,'x',uid,gid,'MySQL User',homedir,shell \ FROM ftp_users \ WHERE uid='%1$u' \ AND login_enabled = 'Y' \ LIMIT 1 getspnam SELECT username,password,FLOOR(UNIX_TIMESTAMP()/86400-1),'1','99999','7','-1','-1','0' \ FROM ftp_users \ WHERE username='%1$s' \ AND login_enabled = 'Y' \ LIMIT 1 getpwent SELECT username,'x',uid,gid,'MySQL User',homedir,shell \ FROM ftp_users getspent SELECT username,password,FLOOR(UNIX_TIMESTAMP()/86400-1),'1','99999','7','-1','-1','0' \ FROM ftp_users getgrnam SELECT groupname,'x',gid \ FROM ftp_groups \ WHERE groupname='%1$s' \ LIMIT 1 getgrgid SELECT groupname,'x',gid \ FROM ftp_groups \ WHERE gid='%1$u' \ LIMIT 1 getgrent SELECT groupname,'x',gid \ FROM ftp_groups memsbygid SELECT username \ FROM ftp_users \ WHERE gid='%1$u' UNION SELECT 'apache' gidsbymem SELECT gid \ FROM ftp_users \ WHERE username='%1$s' UNION SELECT gid FROM ftp_users WHERE 'apache'='%1$s' host localhost database froxlor username froxlor password froxlor socket /var/lib/mysql/mysql.sock #port 3306 #tried with socket or port alone and tried with both socket and port set to prove the socket exists: srwxrwxrwx. 1 mysql mysql 0 27. Aug 20:55 /var/lib/mysql/mysql.sock /etc/libnss-mysql-root.cfg username froxlor password froxlor /etc/nsswitch.conf passwd: files sss mysql shadow: files sss mysql group: files sss mysql To prove the database is ok: MariaDB [froxlor]> select username,uid,gid,password,homedir,shell from ftp_users where username = "silvio"; +----------+-------+-------+------------------------------------+--------------------+------------+ | username | uid | gid | password | homedir | shell | +----------+-------+-------+------------------------------------+--------------------+------------+ | silvio | 10000 | 10000 | $1$BmhsksjjuekdsjfsAeYTlKPB.Ak0OD0 | /home/webs/silvio/ | /bin/false | +----------+-------+-------+------------------------------------+--------------------+------------+ Thanks for any hint! :-)
×
×
  • Create New...