Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: hackersoft on November 17, 2006, 03:40:17 AM
-
Is there a way to change user passwords from the shell instead of the website? For hundreds of users, it take time to change it using the /server-manager panels...
If there's a way to change/reset user passwords without affecting SME's functionality as a whole, that would be cool.
Thanks in advance!
-
You might want to install and use the Lazy Admin Tools. Search for e-smith-lazy_admin_tools-0_9_1-0_noarch.rpm in SME7Contribs (http://no.longer.valid/phpwiki/index.php/SME7Contribs), or here's a direct link: e-smith-lazy_admin_tools-0_9_1-0_noarch.rpm (http://mirror.contribs.org/smeserver/contribs//jbennett/sme7/lat/)
Here's a brief, untested set of installation instructions:
mkdir -p /root/lat
cd /root/lat
wget http://mirror.contribs.org/smeserver/contribs//jbennett/sme7/lat/smeserver-lazy_admin_tools-0.9.1-2.noarch.rpm
rpm -Uvh smeserver-lazy_admin_tools-0.9.1-2.noarch.rpm
Now if you run man lat-users and read through the docs you'll find:lat-users -a -c "harry | Harry | Potter | Quidditch"
Creates user 'harry' from the command line, with password 'Quidditch'.
(You aren't told, but if user "harry" already exists, his information is updated with the values you have specified).
I think you could also do it like this if you're brave (replace "password1", "password2", "password3" with your chosen passwords for "user1", "user2" and "user3":
pico -w /root/masspass.shecho password1 | passwd --stdin user1
echo password2 | passwd --stdin user2
echo password3 | passwd --stdin user3
sh /root/masspass.sh
-
Thanks for the info about lazy admin tools.
I did read the manual for lat but it seems that my
tired eyes didn't notice it will update the password or user
information if the user already exists....
Again, thanks!
-
my tired eyes didn't notice it will update the password or user information if the user already exists
I couldn't find it in the manual either so I tried it on an existing test user and got a very polite message about 'updating existing user'...
-
pico -w /root/masspass.shecho password1 | passwd --stdin user1
echo password2 | passwd --stdin user2
echo password3 | passwd --stdin user3
sh /root/masspass.sh
That will break samba/PPTP passwords - the users will still have their old samba/PPTP passwords.
-
That will break samba/PPTP passwords - the users will still have their old samba/PPTP passwords.
Thanks!
-
Is there some db configuratrion command that will allow root to change a user password from a remote SSH connection?
-
Here are at least 3 options:
1. Install the 'Lazy Admin Tools' (see above)
2. Connect with ssh or putty and run 'su admin', then pick menu option 6 to run 'server-manager' in text mode (somewhat frustrating!)
3. Use ssh or putty to tunnel port 443 to your sme server, then run server-manager locally, like this:
ssh <YourSMEServerName> -l root -C -L 443:127.0.0.1:443
-or-
putty <YourSMEServerName> -C -L 443:127.0.0.1:443
then, from your local workstation, open Firefox and browse to:
https://localhost/server-manager
(you should get the server-manager screen just as if you were on the server's local network...)
-
Thanks for the quick reply. It looks like I wasn't specfic enough. I'm remote, I have putty setup to connect to root with RSA keys, but I can't connect to admin because I never generated the RSA keys for admin login.
I have a user who needs their password reset, so I was just looking for a root command that would work correctly for SME. I don't think the standard linux password command would do because of SME's oddities. Ithought maybe it might be:
db configuration xxx xxx xxx
but I don't know the syntax. It also ocurred to me that their might be a system event commmand that would do the trick.
-
I don't think there is any system event or db command for passwords.
There's no reason you can't use either option 2 or 3 from my last post with putty to a root account. If you can't start putty from the command line, you can specify the tunnel manually once putty is running by:
- click on the top left corner of your putty window
- select 'change settings'
- click on 'SSH' on the left and select 'compression' on the right
- click on 'tunnels' on the left
-- enter 443 in the 'Source Port' field
-- enter 127.0.0.1:443 in the 'Destination' field
-- leave all else unchanged ('Local', 'Auto' selected)
- click on 'Add'
- click on 'Apply'
now login to server-manager at https://localhost/server-manager
-
Doh! I seemed to have missed the whole "su admin" thing.
I got it changed, thanks for your help.