懂 IT系统管理的进!!

[复制链接]
查看11 | 回复2 | 2006-9-23 14:16:49 | 显示全部楼层 |阅读模式
1.在启动时向内核传入参数,不需密码就进入控制台,再改密码;2.用Explore2fs或Partition Explorer可以在windows下直接查看。
回复

使用道具 举报

千问 | 2006-9-23 14:16:49 | 显示全部楼层
1.(1)以grub 系统引导管理器,单用户登录方法;在grub 启动后,移动键盘到Linux的启动项;按e键;然后再移动键盘到类似下面的一行,也就是kernel的那行:kernel /boot/vmlinuz-2.6.11-1.1369_FC4 ro root=LABEL=/1 rhgb quiet把光标移动这行后,再按一下e键,进入编辑这行;在行尾条一个空格 ,然后输入 linux single,也就是类似如下的:kernel /boot/vmlinuz-2.6.11-1.1369_FC4 ro root=LABEL=/1 rhgb quiet linux single结束编辑,按回车返回;接着我们要启动系统,按一下b键启动(2)lilo 引导管理器单用户模式;在boot:处输入linux single2.要安装samba服务,还挺麻烦的Linux8.0下SAMBA的安装及配置 从光盘中找到与SAMBA相关的文件,执行rpm –ivh samba-common-2.2.5-10rpm –ivh samba-2.2.5-10rpm –ivh samba-client-2.2.5-10然后进入/etc/samba执行vi smb.conf 命令,文件编辑如下:[global]workgroup=cbaccessnetbios name=Helloserver string=Hello’s Linux Serverhosts allow=192.168.7. 192.168.1. 192.168.2. 127.printcap name=/etc/printcapload printers=yesprinting=bsdguest account=dragonlog file=/var/log/samba/%m.logmax log size=50security=userencrypt passwords=yessmb passwd file=/etc/samba/smbpasswdunix password sync=yespasswd program=/usr/bin/passwd %upasswd chat=*New*password*%n\n * Retype*new*password*%n\npasswd:all*authentication*tokens*updated*successfully*pam password change=yesobey pam restrictions=yessocket option=TCP_NODELAY SO_RECVBUF=8192 SO_SNDBUF=8192interfaces=192.168.7.148/24dns proxy=no[homes]comment=Hello’s Home Directoriesbrowseable=nowritable=yesvalid users=%s[printers]comment=All Printerspath=/var/spool/sambabrowseable=noguest ok=yeswritable=noprintable=yes[public]comment=Public Stuffpath=/browseable=yesguest ok=yespublic=yeswritable=yesprintable=nowrite list=@staff[dragon]comment=Fred’s Printervalid users=dragonpath=/home/dragonprinter=dragon_printerpublic=nowritable=noprintable=yes配置完成后执行 chmod a+w / 使整个机器共享cd /etc/rc.d/init.d./smb restart创建一个Linux的用户,useradd dragonpasswd dragonsmbpasswd –a dragon成批添加cat /etc/passwd |mksmbpasswd.sh >/etc/samba/smbpasswd/usr/sbin/smbd –D/usr/sbin/nmbd –D在win9x机器上修改注册表WinNT: OHKEY_LOCAL_MACHINE\SYSTEM\ Currentcontrolset\Services\Kdr\ParametersWin98: HKEY_LOCAL_MACHINE\SYSTEM\Currentcontrolset\Services\Vxd\vnetsupWin2000: HKEY_LOCAL_MACHINE\SYSTEM\Currentcontrolset\Services\LanmanWorkstation\Parameters在此处追加键值:键名EnablePlainTextpasswd,值类型为DWORD,值1,此目的主要是因为samba无法还原加密口令,使注册不成功,修改后即可。点击网上邻居,添加NETBEUI协议、TCP/IP协议、Microsoft网络用户,如果使用了DNS要键入DNS的IP地址。从控制面板中点击用户,添加一个Linux中存在的用户,保持与Linux系统中的用户和密码一致,重启计算机,以Linux用户登录即可看到Linux机器。执行netstat –A 192.168.7.148(或主机名)在Linux机器上执行smbclient –L //serversmbclient \\\\server\\共享目录可访问win9x 资源,但不能 copy.创建一个目录 /mnt/smb,执行smbmount \\\\server\\共享目录 /mnt/smb可访问win9x 资源,并能执行cp 命令。Smbumount /mnt/smb 挂点失败。如果想Linux启动后win9x机器就能看到,须作如下处理:配置 /etc/rc.d/init.d/smb脚本,配置文件如下:# ! /bin/sh## chkconfig: -91 35# description:starts and stops the samba smbd and nmbd daemons\# used to provide SMB network services##pidfile:/var/run/samba/smbd.pid#pidfile:/var/run/samba/nmbd.pid#config:/etc/samba/smb.conf#source function libraryif [-f /etc/init.d/functions]: then./etc/init.d/functionselif [-f /etc/rc.d/init.d/functions]:then./etc/rc.d/init.d/functionselseexit 0fi#Avoid using root’s TMPDIRunset TMPDIR#source networking configuration./etc/sysconfig/networkif [-f /etc/sysconfig/samba]:then./etc/sysconfig/sambafi#check that networking is up[${NETWORKING}=”no”]&& exit 0#check that smb.conf exists[-f /etc/samba/sb.conf] || exit 0#check that we can write to it …so non-root users stop her[-w /etc/samba/smb.conf] || exit 0RETVAL=0start() {echo –n $”starting SMB services:”daemon /usr/sbin/smbd –DRETVAL=$?echoecho –n $ “starting NMB services:”daemon /usr/sbin/nmbd –DRETVAL2=$?Echo[$RETVAL –eq o –a $RETVAL 2 –eq o] && touch /var/lock/subsys/smb || \RETVAL=1return $RETVAL}stop(){echo –n $”shutting down SMB services:”killproc /usr/sbin/smbdRETVAL=$?echoecho –n $”shutting down NMB services:”killproc /usr/sbin/nmbdRETVAL2=$?[$RETVAL –eq 0 –a $RETVAL2 eq 0] && rm –f /var/lock/subsys/smbecho “”return $RETVAL}restart(){$0 stop$0 startRETVAL=$?}reload(){echo –n $”Reloading smb.conf file:”killproc –HUP /usr/sbin/smbdRETVAL=$?EchoReturn $RETVAL}rhstatus(){status /usr/sbin/smbdstatus /usr/sbin/nmbdRETVAL=$?}case “$1” instart)start::stop)stop::restart)restart::reload)reload::status)rhstatus::condrestart)[-f /var/lock/subsys/smb] && restart || :::*)echo $ “Usage:$0{start|stop|restart|reload|status|condrestart}”exit 1esacexit $?然后在命令行下执行chmod 700 /etc/rc.d/init.d/smbchkconfig --add smbchkconfig --level 345 smb on配置 /etc/pam.d/samba 文件添加:Auth required /lib/security/pam_pwdb.so nullok shadowAccount required /lib/security/pam_pwdb.so配置 /etc/logrotate.d/samba文件/var/log/samba/log.nmdb{notifemptymissingokpostrotate/usr/bin/killall –HUP nmbdendrotate}/var/log/samba/log.smbd{notifemptymissingokpostrotate/usr/bin/killall –HUP smbdendrotate}
回复

使用道具 举报

千问 | 2006-9-23 14:16:49 | 显示全部楼层
晕了啊我
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行