LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-01-2005, 02:21 PM   #1
wooshyFox
Member
 
Registered: Feb 2005
Distribution: debian sarge
Posts: 97

Rep: Reputation: 15
help with debian webadmin user


Hi guys - here's a newbie question for you....

(but im not quite a newbie - i just never solved it )

....it's probably dead simple...

I have 2 remote debian servers that I use to host websites.
I would like to be able to sftp in to both and upload files to any of the web directories on them with one user account, but I have disabled root login.

I would like to know how to set up a user that will automatically have admin access to any web directory as I create them using a web-based gui admin system.... (I use webmin on one box and 42goISP on the other).

I have just muddled my way through so far (for 4 years!), by changing the owner of the directories manually after I have added them using the gui, (or adding my admin user to each group that is created in the case of 42goisp) but this Im sure will screw up if i ever try to do anything to them with the gui again, since they are originally owned by www-data.
(which by the way I am intrigued by - how do you find out what www-data s password is? and if you change it, does apache and everything else that uses it break?)

-42goisp has all website directories that it creates owned by www-data with a unique group (ie: web22).....

-webmin seems to just create em with ownership as www-data.www-data

Anyone got a simple group/user solution that will help me out without exposing my boxes to too much security risk?

PS Actually I never really solved this problem with the raq i had before these either - I just broke the gui then also... the problem arose because the gui would set every new website to be owned by a new user, when really I wanted to own them all (or at least have the rights to them) myself.

sorry if im rambling - i realise i have 2 different problems here, but i would welcome some useful input as i am unable to google anything of much use...

Thanks
 
Old 03-01-2005, 05:07 PM   #2
nonzero
Member
 
Registered: Feb 2005
Distribution: Debian FC4 LFS Slackware
Posts: 174

Rep: Reputation: 31
You say you have disabled root logins, so how do you elevate your privileges? su,sudo,super?

nz
 
Old 03-01-2005, 06:15 PM   #3
wooshyFox
Member
 
Registered: Feb 2005
Distribution: debian sarge
Posts: 97

Original Poster
Rep: Reputation: 15
generally su - why?
 
Old 03-01-2005, 07:01 PM   #4
nonzero
Member
 
Registered: Feb 2005
Distribution: Debian FC4 LFS Slackware
Posts: 174

Rep: Reputation: 31
If www-data is a user, what happens when you su www-data?

nz
 
Old 03-02-2005, 04:17 AM   #5
wooshyFox
Member
 
Registered: Feb 2005
Distribution: debian sarge
Posts: 97

Original Poster
Rep: Reputation: 15
...i get asked for a password (which i don't know -see above) - this was something I was wondering about; wether I could use www-data as my super-user; but i've seen stuff that recomends against it, cause it has too much privilege (but maybe by that they mean it can access all the websites - which I would put up with :-) )
 
Old 03-02-2005, 09:20 PM   #6
nonzero
Member
 
Registered: Feb 2005
Distribution: Debian FC4 LFS Slackware
Posts: 174

Rep: Reputation: 31
I su to user 'postgres' to do maintenance of postgresql databases, and postfix allows you to su to user 'postfix'. I can't help you with the password as I am not sure whether it would be your root password, your normal user password, or the 'www-data' password whatever that might be. I am thinking that if you are a member of the www-data group it would be your user password, unless you (or the installation) set a password for user 'www-data'. Wish I could be more help right now. Got to do more research.

nz
 
Old 03-02-2005, 09:40 PM   #7
Gibsonist
Member
 
Registered: Mar 2004
Location: Meersburg (GER)
Distribution: Cygwin,RH 7.2 7.3, SuSe 6.4 8.2 9.1,TinyLinux, Debian Sarge, Knoppix 3.*, Knoppicilin, Knoppix STD
Posts: 191

Rep: Reputation: 30
have you tried
su -
and then from your root account su to your user

if I remember correctly
i do not need a password to su from a superuser (root) to a normal user
 
Old 03-03-2005, 04:15 AM   #8
wooshyFox
Member
 
Registered: Feb 2005
Distribution: debian sarge
Posts: 97

Original Poster
Rep: Reputation: 15
the main thing i want to be able to do is to (s)ftp files into all the website directories as one suitable user (convenient for me, and giving a secure-ish ownership of these files) - what i want to know is how this user should be setup....

- it's not so much what to do when I login via putty - i'm ok with that....
 
Old 03-03-2005, 07:00 AM   #9
nonzero
Member
 
Registered: Feb 2005
Distribution: Debian FC4 LFS Slackware
Posts: 174

Rep: Reputation: 31
I believe you already have the tools to do this without making any changes to the system, just have to figure out the right sequence of commands.

nz
 
Old 03-04-2005, 08:46 PM   #10
nonzero
Member
 
Registered: Feb 2005
Distribution: Debian FC4 LFS Slackware
Posts: 174

Rep: Reputation: 31
In webmin change the password of user www-data to something you know. This should allow you to do all the maintenance you need without adding or breaking anything.

nz
 
Old 03-04-2005, 09:28 PM   #11
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
Root can't find out the password of user accounts, but it can change the password to be anything you want. As root, just type
Code:
passwd www-data
That will ask you for a new pasword for www-data, and you'll be good. Also to get the sftp happening, make www-data the owner of the /var/www directory, and you should be able to get to it through ftp. That may mess up your security in other ways, but making it so you can ftp the files into the correct place is trivial, just set the ownership of the location to the account you want to use while ftping, and you're set.

Peace,
JimBass
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
i,m logged in as user now what?/debian smuggly Linux - Newbie 1 08-15-2004 04:55 PM
Do anyone know where Astaro Linux Stores WebAdmin Passwords kareta Linux - General 4 01-18-2004 12:20 PM
Prospective Debian user syouth333 Debian 9 06-25-2003 10:16 PM
webadmin for slack? ixion Linux - Software 2 01-09-2003 07:40 AM
New Debian User cheeky_zombie Linux - Distributions 3 10-23-2001 01:15 PM


All times are GMT -5. The time now is 04:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration